Con questo:
----
var output_xml = new XML();
output_xml.ignoreWhite = true;
output_xml.onLoad = function(success) {
if (success) {
var testo = this.childNodes(nautica);
var textNode = testo.childNodes(nautica);
output_txt.htmlText = textNode.nodeValue;
} else {
output_txt.text = "Error loading XML";
}
};
output_txt.text = "Loading...";
output_xml.load("xml.xml");
-----
leggo questo file xml:
-----
<?xml version="1.0" ?>
<text>testo file xml</text>
-----
Stò cercando di leggere invece un file xml di questo tipo:
-----
<?xml version="1.0" ?>
<text_1>testo 1 file xml</text_1>
<text_2>testo 2 file xml</text_2>
-----
come faccio a scegliere il figlio che mi interessa? se per esempio voglio leggere solo il figlio "text_2"?
Qualcuno sa come si fà?