Reputation: 3536
The xml file is :
<xml-fragment xmlns:xyz="http://someurl">
<xyz:xyzcontent>
<contentattribute>
<key>tags</key>
<value>tag1, tag2</value>
</contentattribute>
</xyz:xyzcontent>
...
I've tried the following:
XPathExpression createdDateExpression = xpath.compile("/contentattribute/key/attribute::tags/value");
Upvotes: 0
Views: 88
Reputation: 38732
There are several problems with your query.
//
in the beginning.attribute
-axis? There is none.xyz
, anyway? I guess it's actually vp
, but you obfuscated incompletely (or are not giving all relevant parts of the document).Try following:
//contentattribute[key='tags']/value
Upvotes: 1