I am trying to construct an XML file and running into namespace issues when trying to set an attribute. I dwindled it down to this simple example:
Dim xml As New XmlDocument
Dim x As XmlElement = xml.CreateElement("http://localhost/abc", "x:doc")
xml.AppendChild x
Dim y As XmlElement = xml.CreateElement("x:another")
y.SetAttribute("x:name", "John")
y.SetAttribute
Notice I am using the namespace “x” in the tag names w/o an issue, but I can’t in the attributes.
Any thoughts?