Skip to main content

%XML.SAX.Parser

class %XML.SAX.Parser extends %Library.RegisteredObject

Implements an interface to the XERCES SAX Parser. XML contained in a file or a stream may be parsed.

Method Inventory

Methods

classmethod IsProxyServerConfigured() as %Boolean
final classmethod ParseFile(pFilename As %String, pHandler As %XML.SAX.ContentHandler, pResolver As %XML.SAX.EntityResolver = $$$NULLOREF, pFlags As %Integer = $$$SAXDEFAULTS, pMask As %Integer = 0, pSchemaSpec As %String = "", pSSLConfiguration As %String = "") as %Status
This method takes the name of a file to be parsed, an instance of a content handler (See %XML.SAX.ContentHandler), optionally an instance of an entity resolver (See %XML.SAX.EntityResolver), flags and a mask. The content handler provides methods which will be called during the parse of the XML document.

The flags control the behavior of the parser by specifying options as a series of bit flags. You can combine the flags by 'OR' ing them together to specify the behavior you require. The flags and their meanings are documented in the %occSAX.inc include file

The mask allows the user to specify which callback methods on the content handler should be called. This enabling the user to optimize the performance of the parser, by limiting the number of callbacks into Cache by the SAX Parser. You can combine the mask bits by 'OR' ing them together to specify the behavior you require. The bits and their meanings are documented in the %occSAX.inc include file. By default the Mask is determined by calling the Mask() method on the supplied content handler

The schemaspec allows the user to specify schema(s) that should be applied to the document. The spec consists of a comma delimited list of schema locations. Each schema location can either be a URL which points to the location of the schema document or a pair of values consisting of a namespace URI followed by a space and then the URL for the location of the schema document. The location without a namespace is known as the noNamespaceSchemaLocation (http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation) and the pair is known simply as the SchemaLocation (http://apache.org/xml/properties/schema/external-SchemaLocation). These values are equivalent to the xsi:schemaLocation attribute and the xsi:noNamespaceSchemaLocation which can appear within standalone XML documents. If an instance of an EntityResolver is not supplied then the SSLConfiguration name will used for entity resolution

final classmethod ParseStream(pStream As %Integer, pHandler As %XML.SAX.ContentHandler, pResolver As %XML.SAX.EntityResolver = $$$NULLOREF, pFlags As %Integer = $$$SAXDEFAULTS, pMask As %Integer = 0, pSchemaSpec As %String = "", pSSLConfiguration As %String = "") as %Status
This method takes the name of a file to be parsed, an instance of a content handler (See %XML.SAX.ContentHandler), an instance of an entity resolver (See %XML.SAX.EntityResolver), flags and a mask. The content handler provides methods which will be called during the parse of the XML document. The entity resolved provides a method for the parser to resolve an external entity reference to a stream containing the content of that entity.

The flags control the behavior of the parser by specifiying options as a series of bit flags. You can combine the flags by 'OR' ing them together to specify the behavior you require. The flags and their meanings are documented in the %occSAX.inc include file

The mask allows the user to specify which callback methods on the content handler should be called. This enabling the user to optimize the performance of the parser, by limiting the number of callbacks into Cache by the SAX Parser. You can combine the mask bits by 'OR' ing them together to specify the behavior you require. The bits and their meanings are documented in the %occSAX.inc include file. By default the Mask is determined by calling the Mask() method on the supplied content handler

The schemaspec allows the user to specify schema(s) that should be applied to the document. The spec consists of a comma delimited list of schema locations. Each schema location can either be a URL which points to the location of the schema document or a pair of values consisting of a namespace URI followed by a space and then the URL for the location of the schema document. The location without a namespace is known as the noNamespaceSchemaLocation (http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation) and the pair is known simply as the SchemaLocation (http://apache.org/xml/properties/schema/external-SchemaLocation). These values are equivalent to the xsi:schemaLocation attribute and the xsi:noNamespaceSchemaLocation which can appear within standalone XML documents. If an instance of an EntityResolver is not supplied then the SSLConfiguration name will used for entity resolution

final classmethod ParseString(pString As %String, pHandler As %XML.SAX.ContentHandler, pResolver As %XML.SAX.EntityResolver = $$$NULLOREF, pFlags As %Integer = $$$SAXDEFAULTS, pMask As %Integer = 0, pSchemaSpec As %String = "", pSSLConfiguration As %String = "") as %Status
This method takes a string of XML to be parsed, an instance of a content handler (See %XML.SAX.ContentHandler), an instance of an entity resolver (See %XML.SAX.EntityResolver), flags and a mask. The content handler provides methods which will be called during the parse of the XML document. The entity resolved provides a method for the parser to resolve an external entity reference to a stream containing the content of that entity.

The flags control the behavior of the parser by specifiying options as a series of bit flags. You can combine the flags by 'OR' ing them together to specify the behavior you require. The flags and their meanings are documented in the %occSAX.inc include file

The mask allows the user to specify which callback methods on the content handler should be called. This enabling the user to optimize the performance of the parser, by limiting the number of callbacks into Cache by the SAX Parser. You can combine the mask bits by 'OR' ing them together to specify the behavior you require. The bits and their meanings are documented in the %occSAX.inc include file. By default the Mask is determined by calling the Mask() method on the supplied content handler The Reserved Parameter is currently reserved for use by intersystems

The schemaspec allows the user to specify schema(s) that should be applied to the document. The spec consists of a comma delimited list of schema locations. Each schema location can either be a URL which points to the location of the schema document or a pair of values consisting of a namespace URI followed by a space and then the URL for the location of the schema document. The location without a namespace is known as the noNamespaceSchemaLocation (http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation) and the pair is known simply as the SchemaLocation (http://apache.org/xml/properties/schema/external-SchemaLocation). These values are equivalent to the xsi:schemaLocation attribute and the xsi:noNamespaceSchemaLocation which can appear within standalone XML documents. If an instance of an EntityResolver is not supplied then the SSLConfiguration name will used for entity resolution

final classmethod ParseURL(pURL As %String, pHandler As %XML.SAX.ContentHandler, pResolver As %XML.SAX.EntityResolver = $$$NULLOREF, pFlags As %Integer = $$$SAXDEFAULTS, pMask As %Integer = 0, pSchemaSpec As %String = "", pHttpRequest As %Net.HttpRequest = $$$NULLOREF, pSSLConfiguration As %String = "") as %Status
This method takes the URL of a file to be parsed, an instance of a content handler (See %XML.SAX.ContentHandler), optionally an instance of an entity resolver (See %XML.SAX.EntityResolver), flags and a mask. The content handler provides methods which will be called during the parse of the XML document.

The flags control the behavior of the parser by specifying options as a series of bit flags. You can combine the flags by 'OR' ing them together to specify the behavior you require. The flags and their meanings are documented in the %occSAX.inc include file

The mask allows the user to specify which callback methods on the content handler should be called. This enabling the user to optimize the performance of the parser, by limiting the number of callbacks into Cache by the SAX Parser. You can combine the mask bits by 'OR' ing them together to specify the behavior you require. The bits and their meanings are documented in the %occSAX.inc include file. By default the Mask is determined by calling the Mask() method on the supplied content handler.

The schemaspec allows the user to specify schema(s) that should be applied to the document. The spec consists of a comma delimited list of schema locations. Each schema location can either be a URL which points to the location of the schema document or a pair of values consisting of a namespace URI followed by a space and then the URL for the location of the schema document. The location without a namespace is known as the noNamespaceSchemaLocation (http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation) and the pair is known simply as the SchemaLocation (http://apache.org/xml/properties/schema/external-SchemaLocation). These values are equivalent to the xsi:schemaLocation attribute and the xsi:noNamespaceSchemaLocation which can appear within standalone XML documents. pSSLConfiguration is the name of the SSLConfiguration to use if you wish to parse a URL with the https protocol. If an instance of an EntityResolver is not supplied then the SSLConfiguration name will be also used for entity resolution

Inherited Members

Inherited Methods

FeedbackOpens in a new tab