【发布时间】:2011-12-25 23:44:09
【问题描述】:
我需要解析 XMind 包中的 content.xml 文件。
文件看起来像这样
<xmap-content xmlns="urn:xmind:xmap:xmlns:content:2.0" xmlns:fo="http://www.w3.org/1999/XSL /Format" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0">
<sheet id="sdfasdfsdf">
<title> Sheet1 </title>
</sheet>
<sheet id="fgasdfgasr">
<title> Sheet2 </title>
</sheet>
<xmap-content>
我需要获取所有工作表的标题列表。
我正在使用XPathExpression expr = navigator.Compile("//sheet");
但我想它不起作用
该怎么办。任何建议或代码都可以。
提前谢谢。
【问题讨论】:
-
如何获得
<title>值一旦我有给定XPathNavigator的<sheet>......好吧,我正在使用XPathNodeIterator iterator = navigator.Select("//xm:sheet", manager);进行迭代
标签: c# .net xml xpath xml-parsing