Important: It is recommended that you record data in a way that takes precedence over attributes, unless you also need to include hierarchical data.
Advantages:
1. Can completely cover the relational database data format design, conducive to exchange.
2. Small footprint. Equivalent to the JSON format, there is no longer a large number of duplicate node name suffixes (including elements and child elements):
2.1 attribute mode, Memory consumption 577 bytes:
<?XML version= "1.0" encoding= "UTF-8"?><Basis><!--This is a database of Buddhist scriptures. -<ContentID= "1"category= "Wisdom"name= "King Kong-like Blessings Sutra"version= "1"/><ContentID= "1"category= "Wisdom"name= "King Kong-like Blessings Sutra"version= "1"/><ContentID= "1"category= "Wisdom"name= "King Kong-like Blessings Sutra"version= "1"/><ContentID= "1"category= "Wisdom"name= "King Kong-like Blessings Sutra"version= "1"/><ContentID= "1"category= "Wisdom"name= "King Kong-like Blessings Sutra"version= "1"/><ContentID= "1"category= "Wisdom"name= "King Kong-like Blessings Sutra"version= "1"/></Basis>
2.2 element mode, memory consumption 781 bytes:
<?XML version= "1.0" encoding= "UTF-8"?><Basis><!--This is a database of Buddhist scriptures. -<Content><ID>1</ID><category>Prajna</category><name>King Kong-like Blessings Sutra</name><version>1</version></Content><Content><ID>1</ID><category>Prajna</category><name>King Kong-like Blessings Sutra</name><version>1</version></Content><Content><ID>1</ID><category>Prajna</category><name>King Kong-like Blessings Sutra</name><version>1</version></Content><Content><ID>1</ID><category>Prajna</category><name>King Kong-like Blessings Sutra</name><version>1</version></Content><Content><ID>1</ID><category>Prajna</category><name>King Kong-like Blessings Sutra</name><version>1</version></Content><Content><ID>1</ID><category>Prajna</category><name>King Kong-like Blessings Sutra</name><version>1</version></Content></Basis>
Recommendation: As long as the XML data format is designed into a relational database format, you can fully use the property to store the data. Using the standard format of the sub-table system to complete the storage of auxiliary data.
XML recommends using attributes first