Skip to main content

EnsLib.HL7.Util.FormatSimpleXMLv2

class EnsLib.HL7.Util.FormatSimpleXMLv2 extends %XML.SAX.ContentHandler, EnsLib.EDI.IOFormatInterface

Schema-free XML import/export format for HL7 v2 messages Consists only of elements along with attributes and content

Property Inventory

Method Inventory

Parameters

Properties

property %Content as %String;
Property methods: %ContentDisplayToLogical(), %ContentGet(), %ContentIsValid(), %ContentLogicalToDisplay(), %ContentLogicalToOdbc(), %ContentNormalize(), %ContentSet()
property %Context as %String [ MultiDimensional ];
Property methods: %ContextDisplayToLogical(), %ContextGet(), %ContextIsValid(), %ContextLogicalToDisplay(), %ContextLogicalToOdbc(), %ContextNormalize(), %ContextSet()
property %DocObj as EnsLib.EDI.Document;
Property methods: %DocObjGet(), %DocObjGetSwizzled(), %DocObjIsValid(), %DocObjNewObject(), %DocObjSet()
property %FieldPath as %String;
Property methods: %FieldPathDisplayToLogical(), %FieldPathGet(), %FieldPathIsValid(), %FieldPathLogicalToDisplay(), %FieldPathLogicalToOdbc(), %FieldPathNormalize(), %FieldPathSet()
property %InCData as %Integer [ InitialExpression = 0 ];
Property methods: %InCDataDisplayToLogical(), %InCDataGet(), %InCDataIsValid(), %InCDataLogicalToDisplay(), %InCDataNormalize(), %InCDataSet()
property %LastLevel as %Integer;
Property methods: %LastLevelDisplayToLogical(), %LastLevelGet(), %LastLevelIsValid(), %LastLevelLogicalToDisplay(), %LastLevelNormalize(), %LastLevelSet()
property %SegFields as %Integer;
Property methods: %SegFieldsDisplayToLogical(), %SegFieldsGet(), %SegFieldsIsValid(), %SegFieldsLogicalToDisplay(), %SegFieldsNormalize(), %SegFieldsSet()
property %SegObj as EnsLib.EDI.Segment;
Property methods: %SegObjGet(), %SegObjGetSwizzled(), %SegObjIsValid(), %SegObjNewObject(), %SegObjSet()

Methods

classmethod ImportDocument(Output pDocObj As EnsLib.EDI.Document, Output pStatus As %Status, pIOStream As %IO.I.CharacterStream, ByRef pConfigItem As %String) as %Boolean
Return 1 if we imported the whole document or got an error. Returning 0 means the caller will do its standard parse.
classmethod ImportSegment(Output pSegObj As EnsLib.EDI.Segment, Output pStatus As %Status, pIOStream As %IO.I.CharacterStream, ByRef pSeparators As %String) as %Boolean
Return 1 if we imported a segment or got an error. Returning 0 means the caller will do its standard parse.
classmethod OutputDocument(pDocObj As EnsLib.EDI.Document, Output pStatus As %Status, pIOStream As %IO.I.CharacterStream, pSeparators As %String, pSequenceNumber As %String) as %Boolean
Return 1 if we took care of the whole document or got an error. Returning 0 means the caller will continue doing component segments as usual.
classmethod OutputDocumentEnd(pDocObj As EnsLib.EDI.Document, Output pStatus As %Library.Status, pIOStream As %IO.I.CharacterStream, pSeparators As %Library.String, pSequenceNumber As %Library.String)
Inherited description: Output any post-segment trailing document content. Called only if OutputDocument() returned 0 meaning it did not complete output of all segments itself.
classmethod OutputSegment(pSegObj As EnsLib.EDI.Segment, Output pStatus As %Status, pIOStream As %IO.I.CharacterStream, pSeparators As %String, pSegNum As %String, pSegPath As %String, pParentDoc As EnsLib.EDI.Document, ByRef pSequenceNumber As %String) as %Boolean
Return 1 if we took care of the segment or got an error. Returning 0 means the caller will output the segment as usual.
method characters(chars As %Library.String, length As %Library.Integer)
Inherited description: Receive notification of character data inside an element.

By default, do nothing. Application writers may override this method to take specific actions for each chunk of character data (such as adding the data to a node or buffer, or printing it to a file).

  • chars: The characters.
  • length: The number of characters to use from the character array.
method endCDATA()
Inherited description: Receive notification of the end of a CDATA section.

The SAX parser will invoke this method at the end of each CDATA parsed.

Exceptions thrown: SAXException - Any SAX exception, possibly wrapping another exception.

/
method endElement(uri As %Library.String, localname As %Library.String, qname As %Library.String)
Inherited description: Receive notification of the end of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file).

  • uri: The URI of the associated namespace for this element
  • localname: The local part of the element name
  • qname: The QName of this element

method endEntity(name As %String)
Inherited description: Receive notification of the end of an entity.

The SAX parser will invoke this method at the end of an entity

  • name: The name of the entity that is ending.

Exceptions thrown: SAXException - Any SAX exception, possibly wrapping another exception.

method fault(text As %String)
method faultStatus(status As %Status)
method startCDATA()
Inherited description: Receive notification of the start of a CDATA section.

The SAX parser will invoke this method at the start of each CDATA parsed.

Exceptions thrown: SAXException - Any SAX exception, possibly wrapping another exception.

method startElement(uri As %Library.String, localname As %Library.String, qname As %Library.String, attrs As %Library.List)
Inherited description: Receive notification of the start of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writin output to a file).

  • uri: The URI of the associated namespace for this element
  • localname: the local part of the element name
  • qname: the QName of this element
  • attrs: a list in $List format consisting of a repeating group of attributes.

The format of the repeating group is as follows:

  • +0 - uri: The URI of the associated namespace for this attribute
  • +1 - localname: The local part of the name of this attribute
  • +2 - qname: The QName of this attribute
  • +3 - type: The type of this attribute ("CDATA", NMTOKEN", "ENTITY", etc.)
  • +4 - value: The value of this attribute

method startEntity(name As %String)
Inherited description: Receive notification of the start of an entity.

The SAX parser will invoke this method at the start of an entity

  • name: The name of the entity that is starting.

Exceptions thrown: SAXException - Any SAX exception, possibly wrapping another exception.

Inherited Members

Inherited Methods

FeedbackOpens in a new tab