请教以下代码: Dim doc As New System.XML.XmlDocument()
doc.LoadXml("<book xmlns:bk='urn:samples' bk:ISBN='1-861001-57-5'>" & _
"<title>Pride And Prejudice</title>" & _
"</book>")
Dim root As System.XML.XmlNode = doc.FirstChild
'Create a new attribute.
Dim ns As String = root.GetNamespaceOfPrefix("bk")
Dim attr As System.XML.XmlNode = doc.CreateNode(System.XML.XmlNodeType.Attribute, "genre", ns)
attr.Value = "novel"
'Add the attribute to the document.
root.Attributes.SetNamedItem(attr)
' Save the document to a file and auto-indent the output.
Dim writer As New System.XML.XmlTextWriter = new.System.XML.XmlTextWriter("d:\桌面\data.xml",Nothing)
writer.Formatting = Formatting.Indented
doc.Save(writer)
最后写入怎么做?