Home > Class Reference > ENSLIB namespace > Ens.Util.XML.Extractor

Ens.Util.XML.Extractor

class Ens.Util.XML.Extractor

Method Inventory (Including Private)

Methods (Including Private)

classmethod Extract(pReader As %XML.TextReader, pElements As %String, Output pValues As %String, Output pErrors As %String, pTrace As %Boolean = 0) as %Status
classmethod ExtractFile(pTargetFile As %String, pElements As %String, Output pValues As %String, pTrace As %Boolean = 0) as %Status
This method is takes the file/path of an XML file to be processed and a dictionary of element 'paths'. An element path consists of a list of element names seperated by the '/' character e.g A/B/C. The 'path' specifies the element for which the value is to be extracted. The XML is examined for matches on the specified element paths. When a match is made the value of the element is extracted and recorded in the pValues array. Set the pTrace parameter to display the 'path' hierarchy found in the document If the Method returns $$$OK then the XML was processed successfully.
classmethod ExtractStream(pTargetStream As %BinaryStream, pResolver As Ens.Util.XML.Resolver, pElements As %String, Output pValues As %String, pTrace As %Boolean = 0) as %Status
This method is takes a stream of XML to be processed and a dictionary of element 'paths'. An element path consists of a list of element names seperated by the '/' character e.g A/B/C. The 'path' specifies the element for which the value is to be extracted. The XML is examined for matches on the specified element paths. When a match is made the value of the element is extracted and recorded in the pValues array. Set the pTrace parameter to display the 'path' hierarchy found in the document If the Method returns $$$OK then the XML was processed successfully.