I should admit that an XML parser wouldn't have any trouble with parsing either document, and should also admit that the extra <children> node created by the first structure may not be necessary, but I think it makes reading and document with the naked eye more intuitive, and reading the source code for processing the parsed node tree more intuitive, because the <children> node organizes the data similar to normalized database structures.
-Nathan.
----- Original Message ----
From: David FOXWELL <David.FOXWELL@xxxxxxxxx>
To: Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
Sent: Tue, March 9, 2010 10:12:45 AM
Subject: [WEB400] Basic question on XML structure
Hi all,
A little inexperienced in xml here.
Compare these 2 structures :
<client>
<name>bill</name>
<children>
<child>
<name>jon</name>
</child>
<child>
<name>joe</name>
</child>
</children>
</client>
<client>
<name>bill</name>
<child>
<name>jon</name>
</child>
<child>
<name>joe</name>
</child>
</client>
Are there any advantages or disadvantages to using or not using the element <children>?
We do not use attributes.
Thanks.
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.