Hi,
I'm tryin in vane to get the number of elements of some type from a XML
document using the count() function.
I'm not in a XSLT document. I'm just trying to get this from a .NET
XmlDocument object.
How can I obtain the number of ROOMs of an offer?
....
<ROOT>
<OFFER ID="219" DURATION="8" IMAGE="CZG2.jpg">
<ROOM PRICE="468.00" PARTICIPANTS="3" />
<ROOM PRICE="479.00" PARTICIPANTS="5" />
<ROOM PRICE="505.00" PARTICIPANTS="7" />
</OFFER>
<OFFER ID="187" DURATION="8" IMAGE="CUIXG6.jpg">
<ROOM PRICE="85.00" PARTICIPANTS="1" />
</OFFER>
</ROOT>
I've loaded the document in a XmlDocument
Dim xml As XmlDocument()
Dim nodes As XmlNodeList
xml=new XmlDocument()
xml.Load("fileName.xml")
nodes=xml.SelectNodes("count(//ROOM[@ID='219'])")
Why this does not work?