How can I get all the ids of xml nodes via xquery?
I would like to get all the ids of xml nodes via xquery
I am trying this line but does not work(returns empty characters)
the xml is like this
ROOT <NODE> <ID>CP1</ID> <..> </NODE> <NODE> <ID>CP2</ID> <...> </NODE> ... </ROOT>
I want to receive a string like this CP1,CP2,CP3....
That would be
because your ids are not attributes but plain elements.
The // prefix will get all ID elements from every level of your document tree