Hi,
I'm playing around with Xfactor's XPath implementation but running into
trouble with a basic test. I can parse the xml fine on the first run, but I
want to subsequently parse those results. Here's the (rough) code:
// This gets a list of the countries
function parseXML(xmlData) {
countriesList = XPath.selectNodes(xmlData, "/map/country");
handleCountry(countriesList[0]);
}
// I want to find the name of a country
function handleCountry(country) {
trace(country); // traces the corect XML out for the country
countryName = XPath.selectNodes(country, "/country/name");
trace(countryName); // shows nothing
// If I do this though, I get back the original results
countryList = XPath.selectNodes(country, "/map/country");
trace(countryList); // shows country list
}
It doesn't seem to point to the XML I've grabbed from the first function.
Traces all seem to be fine up to that point, so I'm really at a loss.
Anyone got any ideas?
- Kevin
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com