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)

xquery doc('MYdb/MY.xml')/ROOT/*/string(@ID)

the xml is like this


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



Need Your Help

Need help understanding sessions and user profile

I'm currently planning my web application. I was thinking using Session to store user profile (user name, current database, permissions, etc...). Common scenario is where user opens several tabs for