什么是XPath表达式,我将用于获取每本书的'HarryPotter:'之后的字符串.
即.鉴于此XML:
<bookstore>
<book>
HarryPotter:Chamber of Secrets
</book>
<book>
HarryPotter:Prisoners in Azkabahn
</book>
</bookstore>
Run Code Online (Sandbox Code Playgroud)
我会回来的:
Chamber of Secrets
Prisoners in Azkabahn
Run Code Online (Sandbox Code Playgroud)
我尝试过这样的事情:
/bookstore/book/text()[substring-after(. , 'HarryPotter:')]
Run Code Online (Sandbox Code Playgroud)
我认为我的语法不正确......