It might be worth checking whether your x.xml file contains any leading
whitespace, or a <!DOCTYPE> element, or an <?xml ...?> declaration - all
of which can confuse the XML parser (the behaviour in such circumstances
is that you're just returned a single text node).
Kieran
tomaszn wrote:
Hi,
I can't get Rhino 1.7 release 2 to manipulate XML files:
wget -O x.html digg.com
tidy -o x.xml -asxml -utf8 /tmp/x.html
rhino -e "x=XML(readFile('/tmp/x.xml'))" -e "print(x..head.length())"
0
The problem doesn't exist with typed XML, like x=<test/>;
How can I get a proper XML object from the file?
Regards,
TN
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino