将字符串转换为Xml [英] Convert string to Xml
本文介绍了将字符串转换为Xml的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尊敬的会员,
我有问题.
我在字符串上收到了HTML结构(表和DIV),我想将其加载到xmlDocumented
这样.
Dear Member,
I have a problem.
i receive a HTML structure(of Table and DIV) on a string and i want to load it to xmlDocumented
like this.
XmlDocument xmlDoc = new XmlDocument();
string xml = hidXML.Value;
xmlDoc.Load(xml);
但是当加载到xmlDoc
时,它会在路径中显示错误消息,例如非法字符.
我该如何解决这个问题,请帮帮我...
谢谢
but when it load to xmlDoc
it show a error message like illegal character in path.
how can i solve this problem please help me...
thank you
推荐答案
请参阅此以获取更多帮助
http://www.c-sharpcorner.com/UploadFile/mahesh/ReadWriteXMLTutMellli2111282005041517AM/ReadWriteXMLTasp /a> [ ^ ]
Refer this for more help
http://www.c-sharpcorner.com/UploadFile/mahesh/ReadWriteXMLTutMellli2111282005041517AM/ReadWriteXMLTutMellli21.aspx[^]
使用以下代码将字符串转换为xml
Hi,
use following code to convert string into xml
XmlDocument doc = new XmlDocument();
doc.LoadXml(myString);
祝你好运
快乐的编码:)
Best Luck
happy coding:)
这篇关于将字符串转换为Xml的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文