Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 1. Writing XML > Creating the Root Element

Creating the Root Element

Every XML document must have one element that completely contains all the other elements. This all-encompassing element is called the root element.

Figure 1.9. In HTML, the root element is always HTML. In XML, you can use any valid name for your root element, including endangered_species, as shown here. No content or other elements are allowed before or after the opening and closing root tags, respectively.



  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint