日期:2014-04-04  浏览次数:21054 次

private 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();
  }