' Add an element ' expC1 Node ' expC2 Element ' expC3 Namespace ' Optional Public Function AddXMLElement(ByVal tcNode As String, ByVal tcElement As String, _ Optional ByVal tcNamespace As String = "") As Boolean ' Create the node Try oXmlElement = oXmlDocument.CreateElement(tcElement, tcNamespace) 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 FunctionThus, I obtain:
<ReferenceInfo/>