-1
<?xml version="1.0" encoding="utf-8"?>
<my:myFields ..........>
<my:ProjectDeliverables>
    <html xmlns="http://www.w3.org/1999/xhtml" xml:space="preserve">
        <p>
        ​    ​&lt;span id="ms-rterangepaste-start"></span>
        ​    <div>Deliverables will include but are not limited to:</div>
        ​    <div><span style="font-family:symbol"><span>·<span style="font:7pt 'times new roman'">         </span></span></span>Feature sets identified by management for Production release of Pfx.Net application.</div>
       ​     <div><span style="font-family:symbol"><span>·<span style="font:7pt 'times new roman'">         </span></span></span>SQL server performance tuning reports</div>
         ​   <div><span style="font-family:symbol"><span>·<span style="font:7pt 'times new roman'">         </span></span></span>SQL alter scripts for each development build</div>
​    ​    ​    ​&lt;span id="ms-rterangepaste-end"></span>
​    ​    ​&lt;/p>
    </html>
</my:ProjectDeliverables>

我正在使用以下内容:-

XmlNodeList nodelist1 = xml.GetElementsByTagName("my:myFields");

key_deliverables = node["my:ProjectDeliverables"].InnerText;

但这不起作用。

4

2 回答 2

0
XmlNodeList nodelist1 = xml.GetElementsByTagName("my:myFields");
var key_deliverables = nodelist1[0].InnerText;
于 2013-09-05T10:14:11.750 回答
0

您需要包含以下 xml 命名空间声明:

使用 XMLNAMESPACES(' http://schemas.microsoft.com/office/infopath/2003/myXSD/2013-09-10T21:30:46 '作为我的

于 2013-10-01T10:54:19.023 回答