PHP100 is the first professional website in China to share PHP resources. It also provides a PHP Chinese communication community. For PHP study researchers: The latest PHP information, original content, open source code and PHP video tutorials and other related content. [Introduction] 1. First, let's briefly introduce XML, which is a text-based markup line Language. similar to html, xml can easily store data. 2. several formats of XML files: Format 1: view an xml cd Directory [html] view plaincopy
1. let's briefly introduce XML. xml is a text-based markup line language, which is similar to html and can store data conveniently.
2. XML file formats:
Format 1: view the CD directory of an XML file
[Html] view plaincopy
Empire Burlesque Bob Dylan
USA
Columbia
10.90
1985
Hide your heart Bonnie Tyler
UK
CBS Records
9.90
1988
Format 2: view the school grade directory of an XML file
[Html] view plaincopy
3. resolution:
1. xml can only have one root-level element, but cannot have multiple root-level elements. for example, add another root-level element in format 2. And an error is reported.
2. xml elements can be nested cyclically. parent elements include child-level elements, and child-level elements can contain their own child-level elements,
For example, format 1: root-level elements Contains child-level elements , And Child-level elements can contain multiple child-level elements.
3. two forms of elements:
Form 1 <节点名称> [Value] For example:Article title
Form 2 <节点名称 属性1="[值]" 属性2="[值]" 属性3="[值]" ... 属性n="[值]/">
For example:
The above is the details of several xml file formats. For more information, see other related articles in the first PHP community!