xml tree structure

Concept: XML refers to extensible markup language (E X- tensible  M arkup  L anguage).

     XML is designed to transmit and store data. It is often used as the profile.

Use XML DTD (document type definition) to tag data and document type definition data, and cross-platform unified format and language, has become the industry-accepted standards.

 

 

 

<bookstore>
<book category="COOKING">
  <title lang="en">Everyday Italian</title> 
  <author>Giada De Laurentiis</author> 
  <year>2005</year> 
  <price>30.00</price> 
</book>
<book category="CHILDREN">
  <title lang="en">Harry Potter</title> 
  <author>J K. Rowling</author> 
  <year>2005</year> 
  <price>29.99</price> 
</book>
<book category="WEB">
  <title lang="en">Learning XML</title> 
  <author>Erik T. Ray</author> 
  <year>2003</year> 
  <price>39.95</price> 
</book>
</bookstore>

  

Example is the root element <bookstore>. All <book> elements in the document are included in the <bookstore> in.

<Book> element has four sub-elements: <title>, <author>, <year>, <price>.

 

 

Related added:

XML DOM

XML DOM defines a standard method for accessing and manipulating XML documents.

XML DOM is independent of language and platform, it can be used with any programming language, such as Java, JavaScript and VBScript.

XSLT

XSLT is a stylesheet language for XML documents.

By XSLT, you can convert XML documents into other formats, such as XHTML.

DTD and XML Schema

A DTD is defined in an XML document what elements, attributes and entities is legal.

By DTD, each of your XML files can carry a description of its own format.

DTD can be used to verify the validity you receive and your own data.

XML Schema will replace DTD.

XML Schema is an XML-based alternative to DTD.

Unlike DTD, XML Schema has begun to support data types, and XML Schema using the XML syntax.

Guess you like

Origin www.cnblogs.com/liweibin00/p/11723898.html