【发布时间】:2012-04-10 05:30:39
【问题描述】:
我有一个这样的xml字符串
string stxml="<Status>Success</Status>";
我还创建了一个 xml 文档
XmlDocument doc = new XmlDocument();
XmlNode docNode = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
doc.AppendChild(docNode);
XmlNode rootNode = doc.CreateElement("StatusList");
doc.AppendChild(rootNode);
我需要这样的输出。
<StatusList>
<Status>Success</Status>
</StatusList>
我怎样才能做到这一点。如果我们使用innerhtml,它会插入。但我想将xml字符串作为xmlnode本身插入
【问题讨论】: