M
Marja Ribbers-de Vroed
Hi,
I'm using MSXML2.DOMDocument.4.0 to create an XML document on-the-fly.
Everything is going great except that at some point I need to create an empty XML element with a start and an end tag, not only an end tag.
Eg. I need to create <Signature></Signature> instead of <Signature />
However, MSXML2.DOMDocument.4.0 refuses to create the empty element with a start and an end tag.
It insists on creating only the closing end tag, even if I try to set text value for the element to "".
I've tried
Set l_oElement = s_oXML.createNode(1, "Signature", "")
l_oElement.text = ""
and I've tried
Set l_oElement = s_oXML.createNode(1, "Signature", "")
Set l_oNodeText = s_oXML.createTextNode("")
l_oElement.appendChild(l_oNodeText)
but it doesn't work like I need it to.
How can I create an empty XML element like <Signature></Signature>?
I'm using MSXML2.DOMDocument.4.0 to create an XML document on-the-fly.
Everything is going great except that at some point I need to create an empty XML element with a start and an end tag, not only an end tag.
Eg. I need to create <Signature></Signature> instead of <Signature />
However, MSXML2.DOMDocument.4.0 refuses to create the empty element with a start and an end tag.
It insists on creating only the closing end tag, even if I try to set text value for the element to "".
I've tried
Set l_oElement = s_oXML.createNode(1, "Signature", "")
l_oElement.text = ""
and I've tried
Set l_oElement = s_oXML.createNode(1, "Signature", "")
Set l_oNodeText = s_oXML.createTextNode("")
l_oElement.appendChild(l_oNodeText)
but it doesn't work like I need it to.
How can I create an empty XML element like <Signature></Signature>?