XPath Node with XPath function count


anyone ever tried to get the XPath function count() running ? (Description:

Is this function implemented or not supported by the node because it returns a number not a string ?

There is a example patch attached.

XPath-count-Test.v4p (6.2 kB)

hi korriander.

No. some functions do not work. this comes because in vvvv we use Xpath only for retrieving the VALUES of selected elements. However, since i am currently reworking the XPath Nodes anyways, i will also have a look on which functions might make sense to implement.

I can already say for the next vvvv release: Xpath (XML) will become XPath (XML Get) with litte changes. per default you will always get the xml data of the elements of the selected nodes unless you dont use the text() function, which will return the VALUE of the selected node. also the XML Input document will be spreadable.
Beside that there will be a node XPath (XML Set) which will be able to set specific Values of selected XML Elements.

Anyhow. for the specific use of the count() funtion i patched a workaround which does the same for you.

hope that helps.

XPath-count-Test-workaround.v4p (9.4 kB)

hi david,

thanks for your reply and workaround which does the job.
Nice to hear that there are advancements planed regarding the XML Nodes.

I use the XML feature to pass values from/to AdobeScript>Illustrator to generate my Text contents.
Looking forward to expand this ‘pipeline’ :)

best korriander