我应该做错事.在display-name下名为"name"的所有节点的XPath查询是什么?我使用的是libxml2.
<?xml version="1.0" encoding="UTF-8"?>
<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:d="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink">
<version value="2010.05.25" />
<identifier value="German.frami2006DE.dictionary.from.org.openoffice.de.by.Karl.Zeiler" />
<display-name>
<name lang="en">German (DE-frami) spelling, hyphenation, thesaurus</name>
<name lang="de">Deutsche (DE-frami) Rechtschreibung, Trennung, Thesaurus</name>
</display-name>
<platform value="all" />
<dependencies>
<OpenOffice.org-minimal-version value="3.0" d:name="OpenOffice.org 3.0" />
</dependencies>
</description>
Run Code Online (Sandbox Code Playgroud)
这是有效的:
xmlXPathRegisterNs(Ctxt, 'ns1', 'http://openoffice.org/extensions/description/2006');
Res := xmlXPathEval('//ns1:name', Ctxt);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1422 次 |
| 最近记录: |