Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/xml/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 将xml数据文件读入Windows.data.xml.Dom.XMLDocument_C#_Xml_Windows Store Apps_Winrt Xaml - Fatal编程技术网

C# 将xml数据文件读入Windows.data.xml.Dom.XMLDocument

C# 将xml数据文件读入Windows.data.xml.Dom.XMLDocument,c#,xml,windows-store-apps,winrt-xaml,C#,Xml,Windows Store Apps,Winrt Xaml,如何将xml数据文件读入Windows.data.xml.Dom.XMlDocument? 以下代码仅适用于System.Xml.XmlDocument 我将xml文件内容读取为字符串,然后使用LoadXml: 我从中获得了大部分代码。我将xml文件内容读取为字符串,然后使用LoadXml: 我从中获得了大部分代码。您需要执行以下操作 XmlDocument xmlDoc = new XmlDocument(); xmlDoc.LoadXml(<string representatio

如何将xml数据文件读入Windows.data.xml.Dom.XMlDocument? 以下代码仅适用于System.Xml.XmlDocument


我将xml文件内容读取为字符串,然后使用LoadXml:


我从中获得了大部分代码。

我将xml文件内容读取为字符串,然后使用LoadXml:


我从中获得了大部分代码。

您需要执行以下操作

XmlDocument xmlDoc = new XmlDocument();  
xmlDoc.LoadXml(<string representation of your xml>);

您需要执行以下操作

XmlDocument xmlDoc = new XmlDocument();  
xmlDoc.LoadXml(<string representation of your xml>);

确保首先调用构造函数。最近,我在excel VBA中使用了以下命令:Dim fedbook作为新的MSXML2.DOMDocument60 fedbook.LoadXML strData。您可以将文件作为字符串读取,然后使用loadxml找到解决方案了吗?请确保首先调用构造函数。最近,我在excel VBA中使用了以下命令:Dim fedbook作为新的MSXML2.DOMDocument60 fedbook.LoadXML strData。您可以将文件作为字符串读取,然后使用loadxml。您找到解决方案了吗?
XmlDocument xmlDoc = new XmlDocument();  
xmlDoc.LoadXml(<string representation of your xml>);