» XPath (XML)
This site relies heavily on Javascript. You should enable it if you want the full experience. Learn more.

XPath (XML)

Help Returns a Spread of matches to XPath Queries
Author vvvv group

Here you are supposed to see an image (rendered with SVG) describing the pins of this node. However, this does not work with Internet Explorer. You may want to consider using another browser, like FireFox, Chrome, Safari or Opera that do support SVG.

Credits
Warnings
Bugs

related discussions

start a forum thread about this node

about XPath (XML)

Returns a Spread of matches from an XPath-Query.
XPath is a W3C Recommendation and describes a way how to navigate through XML Documents.
We can use XPath to select values of elements from a XML File. Every XPath Expression must start with "/". An XPath expression works like navigating a file system; where a forward slash (/) selects subdirectories.
Inside of [ ] Brackets you can specify you your Query. Then you keep on defining the Path with "/". The "@" means that you select an attribute.

There are a lot of functions and operators you can use. We cant give a complete instruction to XPath. But try the Microsoft Reference Online.
A good site to learn everything about the X-Stuff ishttp://www.w3schools.com
A good reference of XPath Syntax and Fuctions is http://msdn.microsoft.com/en-us/library/ms256115.aspx

Examples

if you ever had a look at a .v4p file using a texteditor you will see that those are also pure XML.
so the following examples will be based on vvvv's own files.

parsing a .v4p file with this query

/PATCH/NODE/PIN[@pinname='Descriptive Name']/@values

will output a spread containing all Descriptive Names used in the patch.

/PATCH/NODE[@id='7']/@nodename

will output the nodename of the node with the id ="7"

so this way you can navigate in XML with paths similar to the folderstructures of your harddisk.

you can do more advanced queries like:

/PATCH/NODE[(@nodename='IOBox (Value Advanced)')and(not(PIN[contains(@pinname,'Descriptive Name')]))]/@id

which will output a spread containg all id's of IOBox Values which do NOT have a Descriptive Name.

hints

See also XSLT (XML)

anonymous user login

Shoutbox

~4h ago

joreg: vvvvTv S02E01 is out: Buttons & Sliders with Dear ImGui: https://www.youtube.com/live/PuuTilbqd9w

~6d ago

joreg: vvvvTv S02E00 is out: Sensors & Servos with Arduino: https://visualprogramming.net/blog/2024/vvvvtv-is-back-with-season-2/

~7d ago

fleg: hey there! What's the best tool for remote work? Teamviewer feels terrible. Thanks!

~20d ago

joreg: Last call: 6-session vvvv beginner course starting November 4: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-i/

~1mth ago

joreg: Missed the last meetup? You can rewatch it here: https://www.youtube.com/live/MdvTa58uxB0?si=Fwi-9hHoCmo794Ag

~1mth ago

theurbankind: When is the next big event, like node festival ?

~1mth ago

~1mth ago

joreg: Join us for the next vvvv meetup on Oktober 17th: https://visualprogramming.net/blog/2024/25.-vvvv-worldwide-meetup/

~1mth ago

joreg: 6 session beginner course part 2 "Deep Dive" starts January 13th: https://thenodeinstitute.org/courses/ws24-5-vvvv-beginners-part-ii/