Hello,
I'm having problems with xml processing. Since I haven't worked much
with XML, it's probably a very basic mistake, but I don't see what's
wrong. So here is the XML:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<database name="db">
<table>
<name>firstTable</name>
</table>
<table>
<name>secondTable</name>
</table>
</database>
</config>
and the following code is supposed to select the name-entry of the
second node (which it doesn't) - the varible "xml" contains the
document (it yields the correct output when serialized):
var tables = qx.xml.Element.selectNodes(xml, "//table");
var singleNode = qx.xml.Element.selectSingleNode(tables[1],"name");
alert(qx.xml.Element.getSingleNodeText(singleNode,"name"));
The alert gives "firstTable". However, tables[1] yields the expected
output when serialized, i.e. it contains the second table section.
Nonetheless, I get the text of the first "name" node when trying to
access the second one. So what am I doing wrong?
Thanks in advance and sorry for this basic question.
Michael
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel