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