' Add an element ' expC1 Node ' expC2 Element Public Function AddXMLElement(ByVal tcNode As String, ByVal tcElement As String) As Boolean ' Create the node Try oXmlElement = oXmlDocument.CreateElement(tcElement) Catch loError As Exception cMessage = loError.Message Return False End Try ' Select the node If oXmlNameSpaceManager Is Nothing Then oXmlNode = oXmlDocument.SelectSingleNode(tcNode) Else oXmlNode = oXmlDocument.SelectSingleNode(tcNode, oXmlNameSpaceManager) End If ' See if we obtained the node If oXmlNode Is Nothing Then cMessage = oApp.StrTran(cNodeDoesNotExist, "##Node##", tcNode) Return False End If ' Add the node oXmlNode.AppendChild(oXmlElement) cXML = oXmlDocument.OuterXml Return True End FunctionHowever, I get the result:
<ReferenceInfo xmlns=""/>How to avoid the namespace to be added in there?