So I have been playing with hit, and finding good replies here on FK that's helped me a bit.
How do I only get the attributes from one <search></search> at a time?
Currently the trace shows node attributes (client) from all available <image client=""/>
I would greatly appreciate your help. Been at it for days without a solution.
Here's what I have now:
XML
Code:
<search>
<set name="one">
<image client="google" />
<image client="msn" />
<image client="yahoo" />
</set>
</search>
<search>
<set name="two">
<image client="lycos" />
<image client="altavista" />
<image client="ask" />
</set>
</search>
AS
Code:
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function() {
xmlParse(this);
};
myXML.load("searchengines.xml");
xmlParse = function (xmlObj) {
aNode = xmlObj.childNodes;
len1 = aNode.length;
for (var i = 0; i<len1; i++) {
len2 = aNode[i].firstChild.childNodes.length;
for (var j = 0; j<len2; j++) {
trace(aNode[i].firstChild.childNodes[j].attributes.client);
}
}
};