Skip to main content

%XML.SAX.StreamAdapter

Class %XML.SAX.StreamAdapter Extends %RegisteredObject [ System = 3 ]

For details on using this class, see Customizing How the SAX Parser Is Used.

This class is used to adapt a stream into an XML compliant stream that can be readily consumed by the SAX parser.

Properties

Stream

Property Stream As %RawString;

This holds the stream object passed to the class constructor. May be stream, string or 0 (internal buffer).

Prefix

Property Prefix As %String;

This holds the prefix which has to be logically prepended to the XML stream

PrefixLength

Property PrefixLength As %Integer [ InitialExpression = 0 ];

This holds the length of the calculated prefix

TestBeginning

Property TestBeginning As %Boolean;

This indicates that the beginning of the stream must be checked for UTF-8 BOM without an XML declaration. The BOM will be removed in order to work aorund a Xerces bug.

Flags

Property Flags As %Integer;

This holds Flags

index

Property index As %Integer;

Internal index for SOAP global buffer

Methods

%OnNew

Method %OnNew(initvalue As %RawString) As %Status [ Private ]

Read

Method Read(ByRef pLen) As %String

If there is a prefix then return the prefix, else read from the stream