XmlDocument Node Attribute?

Hi everyone,

I wanna create a XmlDocument with an attribute “standalone” like this: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> I do the creation with this code, but it returns the Xml with the “standalone” attribute. Why? How to fix?

[code]dim xml as new XmlDocument

xml.SetAttribute(“standalone”, “yes”)
MsgBox xml.ToString ’ returns only <?xml version="1.0" encoding="UTF-8"?>
I know, it could be done in that way:

MsgBox xml.ToString.Replace("<?xml version="1.0" encoding="UTF-8"?>", "<?xml version="1.0" encoding="UTF-8" standalone="yes"?>")

Hopefully there is a nicer way :wink: