OScript API/Built-in Package Index |
The DOMParser Package provides an interface to the Document Object Model (DOM) XML parser. The DOM parser provides the ability to validate an XML document according to a Document Type Definition (DTD), to validate for well-formedness, support for namespaces. A set of methods configure various options for parsing and the ability to retrieve the DOMDocument node that represents the root node of the document.
If the specified range of text does not fit into a DOMString
Recoverable error.
Error that will stop processing.
If any node is inserted somewhere it doesn't belong
If index or size is negative, or greater than the allowed value
If an attempt is made to add an attribute that is already inuse elsewhere
Introduced in DOM Level 2. If a parameter or an operation is not supported by the underlying object.
If an invalid character is specified, such as in a name
Introduced in DOM Level 2. If an attempt is made to modify the type of the underlying object.
Introduced in DOM Level 2. If an attempt is made to use an object that is not, or no longer, usable
Informational status or message.
Introduced in DOM Level 2. If an attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
If data is specified for a node which does not support data
If an attempt is made to modify an object where modifications are not allowed
If an attempt was made to reference a node in a context where it does not exist
If the implementation does not support the type of object requested
Introduced in DOM Level 2. If an invalid or illegal string is specified.
Exception thrown that does not correspond to any of the known DOM exceptions.
Validation scheme - always validate.
Validation scheme - automatically validate (default).
Validation scheme - never validate.
Warning message.
If a node is used in a different document than the one that created it (that doesn't support it)
Create a new DOMParser instance.
Return whether the parser will create comment nodes.
Return whether the parser will create entity reference nodes.
Retrieves the Document node of the parsed document.
Return whether support for XML Namespaces should be enabled.
Return whether the parser will process schema.
Retrieves the error count for the parsed document.
Return whether parsing should exit with the first fatal error.
Return the location for external no namespace schema.
Return the location for external schema.
Return whether the parser should include ignorable whitespace.
Return whether the parser will try and load external DTD.
Return whether the parser will treat a validation constraint error as a fatal error.
Return whether the parser will perform full schema validation.
Return the parser validation scheme.
Parse an XML file into a DOM representation.
Parse an XML bytes array into a DOM representation.
Determines whether the parser will create comment nodes.
Determines whether the parser will create entity reference nodes.
Determines whether support for XML Namespaces should be enabled.
Determines whether the parser will process schema.
Determines whether the XML document should be validated against the Document Type Definition (DTD).
Sets the object reference and entry point name for the resolve entity reference callback.
Determines whether parsing should exit with the first fatal error.
Determines whether Entities should be expanded when parsed.
Provide the location for external no namespace schema.
Provide the location for external schema.
Determines whether the parser should include ignorable whitespace.
Determines whether the parser will try and load external DTD.
Determines whether the parser will treat a validation constraint error as a fatal error.
Determines whether the parser will perform full schema validation.
Determines the parser validation scheme.
If the specified range of text does not fit into a DOMString
Recoverable error.
Error that will stop processing.
If any node is inserted somewhere it doesn't belong
If index or size is negative, or greater than the allowed value
If an attempt is made to add an attribute that is already inuse elsewhere
Introduced in DOM Level 2. If a parameter or an operation is not supported by the underlying object.
If an invalid character is specified, such as in a name
Introduced in DOM Level 2. If an attempt is made to modify the type of the underlying object.
Introduced in DOM Level 2. If an attempt is made to use an object that is not, or no longer, usable
Informational status or message.
Introduced in DOM Level 2. If an attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
If data is specified for a node which does not support data
If an attempt is made to modify an object where modifications are not allowed
If an attempt was made to reference a node in a context where it does not exist
If the implementation does not support the type of object requested
Introduced in DOM Level 2. If an invalid or illegal string is specified.
Exception thrown that does not correspond to any of the known DOM exceptions.
Validation scheme - always validate. See SetValidationScheme.
Validation scheme - automatically validate (default). See SetValidationScheme.
Validation scheme - never validate. See SetValidationScheme.
Warning message.
If a node is used in a different document than the one that created it (that doesn't support it)
Returns whether the parser will create comment nodes in the DOM tree.
Returns TRUE, the parser will create comment nodes in the DOM tree, FALSE otherwise.
Returns whether the parser will expand/create entity references when parsed.
Returns TRUE, if the parser will expand/create entities, FALSE otherwise.
Retrieves the Document node of the parsed document.
The Document node.
Returns whether parser support for XML Namespaces is enabled.
Returns TRUE if parser support for XML Namespaces is enabled, FALSE otherwise.
Returns whether the parser's schema support is enabled.
Returns TRUE, if the parser's schema support is enabled, FALSE otherwise.
Retrieves the number of parse errors associated with the parsed document.
An Integer of the number of errors.
Returns whether parsing should exit with the first fatal error.
Returns TRUE if parser should exit parsing when it encounters the the first fatal error, FALSE otherwise.
Returns the previously specified no target namespace XML schema location.
Returns a string containing the no target namespace XML schema location that was previously set with SetExternalNoNamespaceSchemaLocation.
Returns the previously specified list of schemas to use.
Returns a string containing the list of schemas to use that was previously set with SetExternalSchemaLocation.
Returns whether parsed text nodes that can be considered ignorable whitespace are included in the DOM tree.
Returns TRUE, if the parser will create text nodes for ignorable whitespace, FALSE otherwise.
Returns whether the parser will load external DTD when the validation scheme is Val_Never.
Returns TRUE, if the loading of external DTD is enabled, FALSE otherwise.
Returns whether the parser will consider validation constraint errors as fatal.
Returns TRUE, if the parser is currently configured to consider validation constraint errors as fatal, FALSE otherwise.
Returns whether the parser will perform full schema constraint checking.
Returns TRUE, if the parser will perform full schema constraint checking, FALSE otherwise.
Returns the parser validation scheme.
Returns an Integer with one of the defined constant values: Val_Never or Val_Always or Val_Auto.
Parse an XML file into a DOM representation.
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. |
Parse an XML bytes array into a DOM representation.
XML bytes array to be parsed.
Determines whether the parser will create comment nodes in the DOM tree.
TRUE, enables the creation of comment nodes in the DOM tree.
FALSE, disables the creation of comment nodes in the DOM tree.
Determines whether the parser should expand/create entity references.
TRUE, if the parser should expand/create entity references, FALSE otherwise.
Determines whether support for XML Namespaces should be enabled.
TRUE if namespaces should be enabled.
Determines whether the parser's schema support is enabled.
TRUE, to enable the parser's schema support. FALSE, to disable the parser's schema support.
Determines whether the XML document should be validated against the Document Type Definition (DTD). This method has been DEPRECATED and is replaced with SetValidationScheme.
TRUE if the XML document should be validated against the DTD.
Sets the object reference and entry point name for the resolve entity callback.
The return value is a string to the resolved entity. An undefined return value indicates to the parser that it should use its default internal entity resolution.
The reference to the object that has the script to be used in the callback.
The script name of the callback that will be executed on callback.
Determines whether parsing should exit with the first fatal error.
TRUE if parsing should exit with the first fatal error.
Determines whether Entities should be expanded when parsed. This method has been DEPRECATED, and is replaced with SetCreateEntityReferenceNodes.
TRUE if entities should be expanded when parsed.
Provide the no target namespace XML schema location.
The syntax is the same as for the noNamespaceSchemaLocation attribute in an instance document: e.g, "sample.xsd".
Determines whether the parser will create text nodes for ignorable whitespace.
TRUE, if the parser will create text nodes for ignorable whitespace, FALSE otherwise.
Determines whether the parser will load external DTD when the validation scheme is Val_Never. This flag is ignored if the validation scheme is set (see SetValidationScheme) to Val_Always or Val_Auto.
FALSE, parser will ignore any external DTD completely when the validation scheme is Val_Never. TRUE, otherwise (default).
Determines whether the parser should consider validation constraint errors as fatal errors.
TRUE, if the parser should consider validation constraint errors as fatal errors, FALSE otherwise.
Determines whether the parser will perform checks on the schema grammar itself for additional errors. These additional checks could be time-consuming or memory intensive. The default is FALSE.
TRUE, enable full schema constraint checking.
FALSE, disable full schema constraint checking.
Determines parser validation scheme.
Copyright © 2021 OpenText Corporation. All rights reserved. |