Set oProcInstr = oDocOut.createProcessingInstruction("xml",
"version=""1.0""")
oDocOut.insertBefore oProcInstr, oDocOut.childNodes.Item(0)
I can achieve this result in my XML document
<?xml version="1.0" ?>
But, how would I achieve this result?
<?xml version="1.0" encoding="UTF-8"?>
Thanks in advance!
Set oAttr = oDocOut.createAttribute("encoding")
oAttr.value = "UTF-8"
oProcInstr.Attributes.setNamedItem oAttr
"Ron Hinds" <nos...@dontspamme.com> wrote in message
news:Oe2dRDDe...@TK2MSFTNGP05.phx.gbl...
Simply use
Set oProcInstr = oDocOut.createProcessingInstruction("xml",
"version=""1.0"" encoding=""UTF-8""")
--
Martin Honnen --- MVP XML
http://msmvps.com/blogs/martin_honnen/
That doesn't seem to work. Although I get no error, the resulting XML
document has no processing instruction at all in it!
> That doesn't seem to work. Although I get no error, the resulting XML
> document has no processing instruction at all in it!
Of course you still need to insert that node but that line of code does
not change from what you already posted above.