我写了XMl,希望其结构如下:
<videos>
<video>
<type comment="xxxxxxxx"> test </type>
<video>
</videos>
审判
XmlTextWriter writer = new XmlTextWriter("C:\tes.xml");
writer.Formatting = Formatting.Indented;
writer.Indentation = 3;
writer.WriteStartDocument();
writer.WriteStartElement("Videos");
writer.WriteStartElement("video");
writer.WriteElementString("type", "test");
writer.WriteAttributeString("comment", "xxxxxxxx");
writer.WriteEndElement();
但 author.WriteAttributeString(“comment”),“xxxxxxxxxx” ;
don t work , 任何关于如何插入评论的思想