xml|函数|生成xmlprivate void CreateXml()
{
XmlTextWriter xml = new XmlTextWriter( "e:\\aaa.xml",Encoding.UTF8 );
xml.WriteStartDocument();
xml.WriteStartElement( "xml" );
xml.WriteStartElement( "aaaa" );
xml.WriteStartElement("menu");
xml.WriteAttributeString( "a","<>&b" );
xml.WriteEndElement();
xml.WriteEndElement();
xml.WriteEndElement();
xml.WriteEndDocument();
xml.Close();
}
生成xml文档的函数代码
80酷酷网 80kuku.com