Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [Ens] >  [Util] >  [XML] >  [Extractor]
Private  Storage   

class Ens.Util.XML.Extractor

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
3


Summary

Methods
Extract ExtractFile ExtractStream


Methods

• 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.


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.