C#如何实现文本文件到xml之间的转换
请问如何用C#实现读取文本或着excel中的数据,然后把它门转换成xml???
------解决方案--------------------string strXml= " <?xml version=\ "1.0\ "?> "
+ " <Data> "
+ " <Head> "
+ " <Nodeid> 1111 </Nodeid> "
+ " <Subid> 2222 </Subid> "
+ " <Version> 2004 </Version> "
+ " <Date> 20040302 </Date> "
+ " <Time> 101500 </Time> "
+ " </Head> "
+ " <Body> "
+ " <Code> 01 </Code> "
+ " <Name> 深圳 </Name> "
+ " <IdType> 0 </IdType> "
+ " <Idno> 110258740824082 </Idno> "
+ " </Body> "
+ " </Data> ";
XmlDocument doc = new XmlDocument();
doc.LoadXml(strXml);