Click to See Complete Forum and Search --> : Finding the number of nodes in XPATH


rickprice407
December 1st, 2003, 09:30 AM
I have an XML document where some nodes be multiple, such as POs for a customer. How can I determine the number of these using an XPATH expression?

Rick Price

khp
December 1st, 2003, 09:04 PM
count(//PO)

The count function, retuns the number of nodes, it's argument nodeset contains, while //PO selects all the PO elements in the document.