Home  >  Article  >  Backend Development  >  xml learning (1) several file formats of xml

xml learning (1) several file formats of xml

黄舟
黄舟Original
2017-02-23 14:29:472050browse

1. Let’s briefly introduce XML. XML is a text-based markup language, similar to HTML, which can easily store data.

2. Several formats of XML files:

Format 1: View an XML CD directory




    
        Empire Burlesque
        Bob Dylan
        USA
        Columbia
        10.90
        1985
    
    
        Hide your heart
        Bonnie Tyler
        UK
        CBS Records
        9.90
        1988
    

Format 2: View an XML school grade directory





    


3, Analysis:


1.xml can only have one root-level element and cannot have multiple root-level elements. , for example, if you add another root-level element 7dad763e19e697e26a84dcd2c2dc50c062dd55d7eb7ac9391add251a3b7514f1 in format 2, an error will be reported

2.xml elements can be nested in a loop. The parent element contains child elements, and the child element Level elements can contain their own child elements,

For example, format 1: root element34827478705dcb4b6514b72495dec9623a165eef81323bff4941679ce801be6fcontains child elements3bf68e1f532e22971c4f333c467586f5, and d15114bf3dc8d8fe2e2887944c735e50e31671ff5b3c139d436cc2f6b83f000bchild elements can contain multiple child elements of their own

3. Both elements Medium form:

Form 1a6f07ccb7850d17838ce11a97d8f08b6[Value]5f0d23c9ae3aeefd437eff4b71ab32cf For example:b2386ffb911b14667cb8f0f91ea547a7Article title6e916e0f7d1e588d4f442bf645aedb2f

Form 2c1128071b8678675ecc6830a3de146ec

For example:

The above is the content of xml learning (1) Several file formats of xml. For more related content, please pay attention to the PHP Chinese website (m.sbmmt.com)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn