Re: [Flashcoders] XPathAPI recursive XML search

2007-03-01 Thread Joeri van Oostveen
The XPath implementation of XFactorStudio has this built in. There you can do: XPath.selectNodes(xml, //element); to get all nodes whereever that qualitfy. Unfortunately, looks like the XFactorStudio domain is no longer.. I have placed the code I have (and we are still using) here:

Re: [Flashcoders] XPathAPI recursive XML search

2007-02-27 Thread Jim Cheng
Tom Klepl wrote: Thanks for the reply.. unfortunately this only returns matching nodes below the parent node specified. What I need is to crawl the XML tree and find ALL matching nodes, regardless of where they are in the tree. Unfortunately, Flash has never had a good means to traverse an

Re: [Flashcoders] XPathAPI recursive XML search

2007-02-27 Thread Darren Bowers
cant remember where i found this, but i use it quite a lot. Just drop the xml root node in as your source node and it will return an array of all node names that match your query string. /* ** Function: findAllTag(source:XMLNode, key:String):Array ** ** Purpose: Recursively searches for,

Re: [Flashcoders] XPathAPI recursive XML search

2007-02-27 Thread Ron Wheeler
If you start at the top of the tree everything that you want is below you. Tom Klepl wrote: Thanks for the reply.. unfortunately this only returns matching nodes below the parent node specified. What I need is to crawl the XML tree and find ALL matching nodes, regardless of where they are in

Re: [Flashcoders] XPathAPI recursive XML search

2007-02-27 Thread Andrew Eatherington
function getNodes(xmlDoc, tagname, xmlObjArray, isFirst):Array{ if(xmlObjArray == null){ yourArr = new Array(); }else{ yourArr = xmlObjArray; }

Re: [Flashcoders] XPathAPI recursive XML search

2007-02-26 Thread Tom Klepl
Thanks for the reply.. unfortunately this only returns matching nodes below the parent node specified. What I need is to crawl the XML tree and find ALL matching nodes, regardless of where they are in the tree. Tom Quoting [EMAIL PROTECTED]: I believe:

[Flashcoders] XPathAPI recursive XML search

2007-02-23 Thread Tom Klepl
Hi.. I am working on a project currently and I'm using Macromedia's XPathAPI. However, I need to recursively search one of my XML files which is 4 or 5 levels deep. The search I want to perform should return all nodes with a specified name, no matter where they are in the hierarchy.

Re: [Flashcoders] XPathAPI recursive XML search

2007-02-23 Thread LMSpam
I believe: XPathAPI.selectNodeList(node,/*/nameOfNode); will return an array of all child nodes with nameOfNode as their nodeName On Feb 23, 2007, at 5:39 PM, Tom Klepl wrote: Hi.. I am working on a project currently and I'm using Macromedia's XPathAPI. However, I need to recursively