I have a question about extracting a value with xpath
Some part of the xml:
<mark:info>
<mark:Information name="Adress" answer="SomeStreet"/>
<mark:Information name="PhoneNumber" answer="123456789"/>
</mark:info>
I want to receive the text "SomeStreet" with extractValue function in mysql
I was trying to create an xpath expression like
//mark:info/mark:Information[@name='Adress']
but I'm receiving the whole node. I need just the text "SomeStreet" but I'm not sure how to do it.
The xpath //mark:Information[@name="Adress"]/@answer
should give SomeStreet
BTW shouldn't your xml have a xmlns
specifying what is mark
like :
<mark:info xmlns:mark="http://example.com">
?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.