XmlGetInnerXml Function


Returns the inner XML representation of the passed node/document handle. Ensure that the string buffer is large enough to hold the XML. If you pass a document handle you get the inner XML representation of the whole document. If you pass a node handle, you will get the inner representation of the whole node (with all child nodes). Inner represenation means that the node tag itself will not be contained in the buffer.

Include file



XmlGetInnerXml( in    hDocNode   : number,
                inout sXmlString : string,
                in    nMaxXmlLen : number optional ): boolean;

Return value

  • true if successful

  • false otherwise

Parameter Description
hDocNode A valid node/document handle
sXmlString String variable that receives the XML representation
nMaxXmlLen Maximum length of the string to return (optional). If this parameter is omitted or set to STRING_COMPLETE all available data is stored in sXmlString.


  transaction TMain
    hDocument, hResult : number;
    sXmlString         : string;
    hDocument := XmlCreateDocumentFromXml(
                  "<root><child1  attr1='avalue1'>childvalue1</child1>"
                  "<child2 attr1= 'avalue2'>childvalue2</child2></root>");
    hResult := XmlSelectSingleNode(hDocument, "/root/child2"): 
    XmlRemoveChild(hResult ); 
    XmlGetInnerXml(hDocument, sXmlString);
  end TMain;