W3C验证员告诉我
Line 256, Column 12: non SGML character number 0
两个错误都发生在文件的最后。
这是我的缩写代码:
dim writer as XmlWriter
dim xmlSettings as new XmlWriterSettings
xmlSettings.Encoding = Encoding.UTF8
xmlSettings.CheckCharacters = true
xmlSettings.ConformanceLevel = ConformanceLevel.Document
xmlSettings.Indent = true
writer = XmlWriter.Create("D:\somedata.xml", xmlSettings)
writer.WriteStartDocument()
writer.WriteStartElement("listings")
while invReader.Read( )
writer.WriteStartElement("listing")
'a bunch of .writeElementString calls here
writer.WriteEndElement()
end while
writer.WriteEndElement()
writer.WriteEndDocument()
writer.Close()
答案 0 :(得分:0)