I suspect you're expecting similar results to using XSLT where you
<xsl:template match="blah"> statement bearing in mind this only works
when you use the <xsl:apply-templates />, which crawls the tree
applying the xpath statements.

Remember all you statements are relative to the root node that you
pass in (in your example is "<xml>")

To my knowledge the XPathAPI wont support what you want, you're need
to do some kind of recursion....

May be worth looking at the other XPath library, cant remember where
it is, but a quick google will point you in the right direction i'm
sure...

On 8/1/06, Lori Hutchek <[EMAIL PROTECTED]> wrote:
The reason I am trying to do the wildcard search is because I have nodes
of the same name at different levels and I need them all. So giving a
specific path wouldn't give me all of the nodes I need.

Here's an expert...
<xml>
<node nodid="cue14">
</node>

<node nodid="cue15" >
    <closecaptioning><![CDATA[]]></closecaptioning>
    <actions>
        <action type="evt_post">
            <data type="reply" order="1" videofile="debate1.flv"
length="55666">
                <slides>
                        <node nodid="cue1" order="13" index="true"
slidefile="" printfile="slide1.jpg" thumbfile="slide1.jpg" type="slide"
>

<closecaptioning><![CDATA[]]></closecaptioning>
                                <actions />
                        </node>
                </slides>
         </action>
        </actions>
</node>
</xml>

Yes * and / are mathematical operators but in the context of a xpath
search they are used as you expect if you were doing a regex search...
which also supports the * and /

What I am attempting to do is get all the node nodes by doing
r = XPathAPI.selectNodeList(myXML,"/*/node");


If anyone else has experienced the same trouble and know a way around it
or know what I'm doing wrong that would be great!!!!!!!!!

Thanks!
Lori-


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of ryanm
Sent: Tuesday, August 01, 2006 2:42 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] XPathAPI problems with wildcard searches

> r = XPathAPI.selectNodeList(x,"/*/item");
>
    The problem is that / and * are both node operators and math
operators,
so your statement is ambiguous. The obvious answer, based on your
example
XML, is to use "./items/item", but I don't know if your real XML is more

complex or not. If it is, you just need to make your select statement
more
explicit.

ryanm

_______________________________________________
[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
_______________________________________________
[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



--
[EMAIL PROTECTED]
_______________________________________________
[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

Reply via email to