Hello
Is there an API to translate a Dom object to a structure of Javascript
objects and arrays?
For example, if I have the root Document object for this XML:
<addressBook revision="123">
<card>
<name>John Smith</name>
<email>[EMAIL PROTECTED]</email>
</card>
<card>
<name>Fred Bloggs</name>
<email>[EMAIL PROTECTED]</email>
</card>
</addressBook>
Is there an API somewhere that will translate it to a Javascript
object, so that I can assert things like:
[EMAIL PROTECTED] == "123"
myXml.card.length == 2
myXml.card[0].name == "John Smith"
myXml.card[0].email == "[EMAIL PROTECTED]"
myXml.card[1].name == "Fred Bloggs"
myXml.card[1].email == "[EMAIL PROTECTED]"
(This is just an example, I'm sure there's ambiguities with this model.)
Alternatively, what is the standard Cocoon way of processing XML data
in Flowscript?
Tobia
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]