XML的写入问题
写入后为何没有换行,一行下来了。。。。。
Dim XMLDoc As New System.Xml.XmlDocument
XMLDoc.Load(UpdateList.xml ")
Dim XMLData As System.Xml.XmlNode = CType(XMLDoc.ChildNodes, System.Xml.XmlNodeList).Item(1)
XMLData.RemoveAll() '移除原有的全部数据
' '=====================================================
XMLData = XMLDoc.DocumentElement
Dim NewElement As System.Xml.XmlElement = XMLDoc.CreateElement( "FileCount ")
NewElement.SetAttribute( "Count ", "100 ")
NewElement.InnerText = "100个哦 "
XMLData.AppendChild(NewElement)
XMLData = NewElement
NewElement = XMLDoc.CreateElement( "FileList ")
NewElement.SetAttribute( "name ", "B ")
NewElement.InnerText = "App.Path "
XMLData.AppendChild(NewElement)
NewElement = XMLDoc.CreateElement( "FileList01 ")
NewElement.SetAttribute( "name ", "A ")
NewElement.InnerText = "App00.Path "
XMLData.AppendChild(NewElement)
XMLDoc.Save(UpdateList.xml ")
------解决方案--------------------是啊,因为你没有操作空白字符,呵呵
不过问题的关键,如果不影响使用,那就这样好了