[thelist] Problems traversing XML tree in JavaScript
VOLKAN ÖZÇELİK
volkan.ozcelik at gmail.com
Tue Aug 2 08:24:01 CDT 2005
Sorry the mail was sent in the middle of the post.
__________________________________________
not actually
catalogs.xml:
<catalog>
<item>
<name>music item 1</name>
<type>cd</type>
</item>
... all other items to be listed in the catalog.
</catalog>
now if I need something like <sites> it will be totally irrelevant to
put it into the catalogs xml.
<sites>
<site>...</site>
<site>...</site>
</site>
So I have two root nodes, one for sites, one for catalogues: and two
seperate xml documents. logically consistent.
If I want to enlarge sites xml and say add domains to it. Then it is
possible that I am thinking of a larger entity:
<web-settings>
<sites>
<site></site>
<site></site>
</sites>
<response-filters>
<filter>...</filter> ...
</response-filters>
<subdomains>
<domain></domain> ...
</subdomains>
</web-settings>
we may expand web-settings even further:
<project-settings>
<web-settings></web-settings>
<environment-settings></environment-settings>
<compiler-options></compiler-options>
</project-settings>
So imho, a root node is something that "perfectly" makes sense.
Assigning it a general anonymous name such as root would be at least
semantically incorrect.
Cheers
Volkan.
More information about the thelist
mailing list