Colibrio Reader Framework API - Cloud license
    Preparing search index...

    Contains methods to parse html and xml string into Document instances. The browser's default DOMParser returns a Document regardless if the source string is valid or not. The methods in this class detects for parsing errors and throws exceptions if any parsing error occurs.

    Implements

    Constructors

    Methods

    • Parses the string as an HTML Document

      Parameters

      • str: string

        The HTML string to parse as a Document.

      • path: string

        The path to the file. Used for error reporting.

      Returns HTMLDocument

      CoreXmlError with type "DOM_PARSE_ERROR" if the string is invalid HTML

    • Parses the string as an XHTML Document

      Parameters

      • str: string

        The XHTML string to parse as a Document.

      • path: string

        The path to the file. Used for error reporting.

      Returns HTMLDocument

      CoreXmlError with type "DOM_PARSE_ERROR" if the string is invalid XHTML

    • Parses the string as an XML Document

      Parameters

      • str: string

        The XML string to parse as a Document.

      • path: string

        The path to the file. Used for error reporting.

      Returns XMLDocument

      CoreXmlError with type "DOM_PARSE_ERROR" if the string is invalid XML