我正在附上
下面的示例XML文件<root xmlns:foo="http://www.foo.org/" xmlns:bar="http://www.bar.org">
<actors>
<actor id="1">Christian Bale = Liam Neeson and Michael Caine</actor>
</actors>
<foo:singers>
<foo:singer id="4">Tom Waits=B.B. King and Ray Charles</foo:singer>
</foo:singers>
我想要一个只能提取文本的XPath&#34; Liam Neeson&#34;来自演员&#39;标签。通过使用正则表达式。
我写了一个类似的xpath &#34; //演员[1] /文本()&#34;它将输出作为 &#34; Christian Bale = Liam Neeson和Michael Caine&#34;。但我想只提取&#34; Liam Neeson&#34;一部分。