XPath is not supported by jQuery (since a while). There once was a
plugin that adds support, but I am not sure if that is maintained
still.

--Klaus


On 11 Nov., 15:59, BogN <[EMAIL PROTECTED]> wrote:
> I am trying to load an xml , and then to query the xml through xpath.
>
> I am trying to load an xml, and then to query it using xpath.
>
> i've tried this:
>
> $.ajax({
> type: "GET",
> url: "Menu.xml",
> dataType: "xml",
> success:
> function(xml)
> {
>     $(xml,'/Root/Item').each(...);
>
> }
> }
>
> <Root>
>     <Item ID="1"></Item>
>     <Item ID="2"></Item>
>     <Item ID="3"></Item>
>     <Item ID="4"></Item>
> </Root>
>
> This returns me 0.
>
> But if i change it to
>
>     $(xml,'Root>Item').each(...);
>
> it works.
>
> But i need to make "real" xpath queries.
>
> PLz help me

Reply via email to