OScript API/Built-in Package Index |
The SAXParser Package provides an interface to the XML SAX parser. The SAX parser provides the ability to use a lightweight XML parser. One set of methods configures the various options for parsing. Another set of methods is used to set up the callbacks that are necessary for the SAX parser to report its results. Two callbacks, StartDocument and EndDocument, signals of the start and end of parsing a document. Another set of callbacks, StartElement and EndElement tell when the start and end of a tag is found. Last the callback, Characters, reports the data value for a tag.
Text is too large for a DOMString.
Error.
FatalError.
Attempt to insert a node where it doesn't belong.
Index is out of bounds.
Parameter or operation is not supported by the object.
An invalid character was specified.
An attempt to modify the type of the object.
The object is no longer usable.
Message.
Modification of object violates the namespace.
This node does not support data.
Modifications are not allowed.
Reference to a node in a context where it does not exist.
The implementation does not support this type of object.
An invalid or illegal string has been specified.
Unknown exception.
The parser will always report validation errors.
The parser will report validation errors only if a grammar is specified.
Do not report validation errors.
Warning.
Attempt to use a node in a different document.
Create a new SAXParser instance.
Parse an XML file.
Start a progressive parse on a XML file.
Start a progressive parse on a string containing a XML document.
This method is used to continue with progressive parsing of XML files started by a call to 'parseFirst' method.
Reset the parser after a progressive parse.
Parse a XML doc contained in a string.
Forces the removal of all temporary files if a document is not being parsed.
Receive notification of character data.
Determines if temporary files should be deleted immediately after the element that uses the the temporary file is processed.
Receive an object for locating the origin of SAX document events.
Determines whether support for XML Namespaces should be enabled.
Set the 'do schema' flag.
Determines whether the XML document should be validated against the Document Type Definition (DTD).
Receive notification of the end of a document.
Receive notification of the end of an element.
Receive notification of the end of a namespace prefix mapping.
Set an entity resolver callback.
Determines whether parsing should be ended when the first fatal error occurs.
Receive notification of ignorable whitespace in element content.
Receive notification of a processing instruction.
Reset the Document object on its reuse.
Receive notification for each entity skipped.
Receive notification of the beginning of a document.
Receive notification of the beginning of an element.
Receive notification of the beginning of a namespace prefix mapping.
Sets a list of tags that require temporary files because their content (value) is too large for an Oscript string.
This method allows users to set the parser's behaviour when it encounters a validtion constraint error.
This method allows the user to turn full Schema constraint checking on/off.
This method allows users to set the validation scheme to be used by this parser.
Text is too large for a DOMString.
Error.
FatalError.
Attempt to insert a node where it doesn't belong.
Index is out of bounds.
Parameter or operation is not supported by the object.
An invalid character was specified.
An attempt to modify the type of the object.
The object is no longer usable.
Message
Modification of object violates the namespace.
This node does not support data.
Modifications are not allowed.
Reference to a node in a context where it does not exist.
The implementation does not support this type of object.
An invalid or illegal string has been specified.
Unknown exception.
The parser will always report validation errors.
The parser will report validation errors only if a grammar is specified.
Do not report validation errors.
Warning.
Attempt to use a node in a different document.
Parse an XML file.
XML file to be parsed.
An Assoc that contains:
Boolean | OK | Status of the parse. |
RecArray | Error | Errors that occurred during parsing. |
If the status of the parse is false, then the error RecArray contains:
String | ErrType | The type of error: warning, error or fatal. |
String | ErrMsg | Parser generated error message. |
String | PublicID | Public Identifier of the XML file, filename in this instance. |
String | SystemId | System Identifier of the XML file, usually empty. |
Integer | LineNumber | Line number in the file in which the error occurred. |
Integer | ColumnNumber | Column number in the file in which the error occurred. |
This method is used to start a progressive parse on a XML file. To continue parsing, subsequent calls must be to the parseNext method.
Path to the XML file to be parsed.
This method is used to start a progressive parse on a string containing a XML document. To continue parsing, subsequent calls must be to the parseNext method.
String containing the XML document to be parsed.
This method is used to continue with progressive parsing of XML files started by a call to 'parseFirst' method.
Parse a XML doc contained in a string.
The string containing the SML doc.
Removes temporary files if a document is not being parsed.
Receive notification of character data. The characters handler is void Characters ( String name, Integer size ) , where the tag name is stored in the variable name, and the variable size is the length of the name.
An instance of the sax parser.
An instance of the handler method.
Determines if temporary files should be deleted immediately after the element that uses the the temporary file is processed.
True if temporary file should be deleted after tag is processed.
Receive an object for locating the origin of SAX document events.
An instance of the sax parser.
An instance of the handler method.
Determines whether support for XML Namespaces should be enabled.
True if namespaces should be enabled.
Set the 'do schema' flag. This method allows users to enable or disable the parser's schema processing. When set to false, parser will not process any schema found.
The value specifying whether schema support should be enforced or not.
Determines whether the XML document should be validated against the Document Type Definition (DTD).
True if the XML document should be validated against the DTD.
Receive notification of the end of a document. The end document handler is EndDocument ().
An instance of the sax parser.
An instance of the handler method.
Receive notification of the end of an element. The end element handler is void EndElement ( String name ) , where the tag name is stored in the variable name.
An instance of the sax parser.
An instance of the handler method.
Receive notification of the end of a namespace prefix mapping.
An instance of the sax parser.
An instance of the handler method.
Set an entity resolver callback.
An instance of the sax parser.
An instance of the resolver callback method.
Determines whether parsing should be ended when the first fatal error occurs.
True if exit on first error.
Receive notification of the end of an element. The ignorable whitespace handler is void IgnorableWhitespace ( String chars, Integer size ) , where the variable chars stores the characters to ignore, and the variable size is the length of the chars.
An instance of the sax parser.
An instance of the handler method.
Receive notification of a processing instruction. The handler for processing instruction of the form void ProcessingInstruction ( String target, String data ) , where target is the target of the processing instruction and data is the processing instruction data.
An instance of the sax parser.
An instance of the handler method.
Reset the document on its reuse. The handler is void ResetDocument ( )
An instance of the sax parser.
An instance of the handler method.
Receive notification for each entity skipped
An instance of the sax parser.
An instance of the handler method.
Receive notification of the beginning of a document. The handler signature is StartDocument ( ).
An instance of the sax parser.
An instance of the handler method.
Receive notification of the beginning of an element. The handler signature is StartElement ( String name, Assoc attributes ), where the name of the element is the first argument and attributes is an Assoc which holds the name, value pairs for the attributes of the element.
An instance of the sax parser.
An instance of the handler method.
Receive notification of the beginning of a namespace prefix mapping.
An instance of the sax parser.
An instance of the handler method.
Sets a list of tags that require temporary files because their content (value) is too large for an oscript string. If a tag is passed in this list, then when the StartElement callback occurs an attribute "filename" is added to the attribute list. The value for the attribute holds the name of the temporary file.
List of strings that will require temporary files.
This method allows users to set the parser's behaviour when it encounters a validtion constraint error. If set to true, and the the parser will treat validation error as fatal and will exit depends on the state of "getExitOnFirstFatalError". If false, then it will report the error and continue processing.
If true, the parser will exit if "setExitOnFirstFatalError" is set to true.
This method allows the user to turn full Schema constraint checking on/off. Only takes effect if Schema validation is enabled. If turned off, partial constraint checking is done.
True to turn on full schema constraint checking.
This method allows users to set the validation scheme to be used by this parser. The value of newScheme is one of the ValSchemes enumerated values defined by this class:
The new validation scheme to use.
Copyright © 2021 OpenText Corporation. All rights reserved. |