Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
When doing something like /entries/entry/key='test', I always get the node key returned. But I want the entry node. How can I get it?
/entries/entry/key='test'
My XML looks like this:
<entries> <entry> <key>test</key> </entry> </entries>
true
false
You want to select the entry node and match subelement "key"'s value to the text 'test' . This should do it:
/entries/entry[key='test']
Add a comment
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.
/entries/entry/key='test'it's an existencial comparison. I should returntrueorfalse