XmlFreeDoc Function
Frees memory for XML documents in memory (DOM representation).
Usage
status = XmlFreeDoc(document_id)
Input Parameters
document_id—The document to free and release memory for.
Returned Value
status—A value of 1 is returned if the operation was successful.
Discussion
This routine is used to reclaim memory for documents parsed using XmlParse, or created from scratch using XmlNewDoc. Typically this is called after a document has been queried with XmlEvaluate and is not needed anymore, or if the document has been exported using XmlDocDump and the DOM representation in memory is no longer needed. Be careful to only call this routine once for a given document ID or a segmentation fault could result.
Example 1
This example removes a DOM model from memory.
; Parse and evaluate a document
doc_id = XmlParse('chart.xml', /file)
table = XmlEvaluate(doc_id, '//*')
; Free the document
status = XmlFreeDoc(doc_id)