In XML, how should a list be represented?
With an enclosing list entity:
<person>
<firstname>Joe</firstname>
<lastname>Bloggs</lastname>
<children>
<child .../>
<child .../>
<child .../>
<child .../>
<child .../>
</children>
</person>
Or without:
<person>
<firstname>Joe</firstname>
<lastname>Bloggs</lastname>
<child .../>
<child .../>
<child .../>
<child .../>
<child .../>
</person>
XML List takes an XML document as a request and returns an XML document with the requested data. A list can represent data in a table, a business view, or data from a table conversion. Using data from a table conversion enables you to use multiple tables.
XML Naming RulesElement names must start with a letter or underscore. Element names cannot start with the letters xml (or XML, or Xml, etc) Element names can contain letters, digits, hyphens, underscores, and periods. Element names cannot contain spaces.
What is XML? The Extensible Markup Language (XML) is a simple text-based format for representing structured information: documents, data, configuration, books, transactions, invoices, and much more. It was derived from an older standard format called SGML (ISO 8879), in order to be more suitable for Web use.
Definition and Usage The list element defines a simple type element as a list of values of a specified data type.
For extensibility, I would use the first solution (the one with the children node). If you ever wish to store any data about all of the children then you have a convenient node on which to place attributes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With