I have a xml file with the following content :
<?xml version="1.0" ?>
<books>
<book>
<price> "44.95" </price>
<title>Core Java 1.5</title>
<author>Piet Klerksenc </author>
<nrPages>1487</nrPages>
</book>
<book>
<price> "59.95" </price>
<title>Developing with Servoy</title>
<author>Cheryl Owens and others</author>
<nrPages>492</nrPages>
</book>
</books>
It displays oke in internet explorer.
I try to read it using the following method.
var xmlNode= plugins.XmlReader.readXmlDocumentFromFile('c:/abc.xml');
var attributeNames = xmlNode[0].getAttributeNames();
for(i = 0; i < attributeNames.length; i++)
{
currAttributeName = attributeNames[i];
currAttributeValue = xmlNode.getAttributeValue(currAttributeName);
application.output(currAttributeName + ": " + currAttributeValue);
}
The value of attributeNames.length is 0 so the attribute names are not read properly.
Anyone any idea of what i am doing wrong ?