Dim objXMLElement As XmlNode = Nothing
Dim objXMLElement1 As XmlNode = Nothing
Dim objXMLAttribute As XmlAttribute = Nothing
objXMLElement1 = doc.CreateElement("Country")
objXMLElement1.InnerText = "united kingdom"
objXMLAttribute = doc.CreateAttribute("Code")
objXMLAttribute.Value = "GBR"
objXMLElement1.Attributes.Append(objXMLAttribute)
objXMLElement.AppendChild(objXMLElement1)
这个元素没有创建属性值,它只创建innertext如何解决这个问题