I've been battling trying to extract values from a node name and attribute value using xpath with xml. I've searched on this many times but not found anything about my particular issue of String= being part of the returned output.
I thought I had the syntax correct, but somehow while trying to extract values through xpath I am getting String='value' instead of just value.
When I try
string(/Data/child::object1/string(@display_value))
The output is String='482899' whereas I had hoped for 482899 (or '482899'). Similarly with this:
name(/Data/child::object1)
That's return String='object1'.
The XML I am working with is static (I cannot edit its format, which is part of why I have such tortured xpath). Below is a partial sample of the XML:
<?xml version="1.0"?>
<Data>
<object1 display_value="482899" />
<object2 display_value="61317 " />
</Data>
Any help or guidance would be appreciated.
stringjust shows the type of output. How do you run your code? I am sure you can turn off the output type in your program.String=is not coming from the XPath. It's coming from the environment (e.g. programming language) that you're evaluating the XPath with. Tell us about that environment and someone can doubtless help you fix it.