buymeapc Posted September 24, 2010 Share Posted September 24, 2010 Hi all, I've been searching the forums and I can't quite find what I need. I have XML documents with several levels of child nodes. The child nodes are not all the same within the XML docs and the paths can change. I know which node I want the data from, but I can't quite figure out how to browse through the XML document searching for one node that could be anywhere in the tree. How could I find a random node in an XML document and retrieve its data? Thanks! Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 24, 2010 Share Posted September 24, 2010 Search for posts using the _XMLDomWrapper.au3 UDF from eltorro. It uses XPath syntax. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
buymeapc Posted September 27, 2010 Author Share Posted September 27, 2010 I had been been basing my searches off of that. Great tool, but couldn't quite figure out how to use it for my specific need. Every function required the node path and that was the part I didn't have, sadly. I ended up reading the entire xml into a variable and using the StringBetween function to find the (random) node in question. Not as elegant as I would have liked, but it gets the job done. Thanks for the help! Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 27, 2010 Share Posted September 27, 2010 If you can post an example XML it might be possible to create a demo with it. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
4ggr35510n Posted September 27, 2010 Share Posted September 27, 2010 Dunno is it what you need, but it's the best XPath tutorial I've ever found: http://www.zvon.org/xxl/XPathTutorial/General/examples.html Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now