# XPath Node with XPath function count

**URL:** <http://forum.vvvv.org/t/xpath-node-with-xpath-function-count/2423>\
**Category:** general\
**Created:** [November 1, 2007, 8:10pm UTC](http://forum.vvvv.org/t/xpath-node-with-xpath-function-count/2423 "2007-11-01T20:10:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![korriander](http://forum.vvvv.org/letter_avatar_proxy/v2/letter/k/999999/32.png) [@korriander](http://forum.vvvv.org/u/korriander)\
**Post date:** [November 1, 2007, 8:10pm UTC](http://forum.vvvv.org/t/xpath-node-with-xpath-function-count/2423/1 "2007-11-01T20:10:02Z")

</div>

Hi,

anyone ever tried to get the XPath function **count()** running ? (Description: [http://msdn2.microsoft.com/en-us/library/ms256103.aspx](http://msdn2.microsoft.com/en-us/library/ms256103.aspx))

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](https://vvvv.org/sites/default/files/user-files/XPath-count-Test.v4p) (6.2 kB)

---

<div class="post-metadata">

**Author:** ![david](http://forum.vvvv.org/user_avatar/forum.vvvv.org/david/32/21253_2.png) [@david](http://forum.vvvv.org/u/david)\
**Post date:** [November 1, 2007, 9:03pm UTC](http://forum.vvvv.org/t/xpath-node-with-xpath-function-count/2423/2 "2007-11-01T21:03:22Z")

</div>

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](https://vvvv.org/sites/default/files/user-files/XPath-count-Test-workaround.v4p) (9.4 kB)

---

<div class="post-metadata">

**Author:** ![korriander](http://forum.vvvv.org/letter_avatar_proxy/v2/letter/k/999999/32.png) [@korriander](http://forum.vvvv.org/u/korriander)\
**Post date:** [November 2, 2007, 11:15am UTC](http://forum.vvvv.org/t/xpath-node-with-xpath-function-count/2423/3 "2007-11-02T11:15:54Z")

</div>

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
