Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery and XPath XML parsing

Tags:

jquery

xml

xpath

I want to parse XML using jQuery. Is it possible to parse using XPath? Are there any functions for that in jQuery?

like image 977
Andromeda Avatar asked Jun 10 '09 12:06

Andromeda


People also ask

What is XPath selector in jQuery?

XML Path Language (XPath) is a type of language for identifying different elements or their values within XML documents, similar to the way CSS identifies elements in HTML documents. The jQuery library supports a basic set of XPath selectors that we can use alongside CSS selectors, if we so desire.

What is XPath in XML example?

XPath uses path expressions to select nodes or node-sets in an XML document. These path expressions look very much like the expressions you see when you work with a traditional computer file system. XPath expressions can be used in JavaScript, Java, XML Schema, PHP, Python, C and C++, and lots of other languages.

What is XML in jQuery?

The parseXML() method in jQuery is used to parse a string into an XML document. It uses native methods of the browser for creating a valid XML document. This valid XML document can be passed to jQuery for creating a jQuery object that can be manipulated or traversed.


1 Answers

Not directly, but you can use jQuery selectors to achieve the same thing.

Previous versions (1.2) at: http://docs.jquery.com/DOM/Traversing/Selectors

like image 63
gargantuan Avatar answered Sep 27 '22 21:09

gargantuan