Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

Hierarchy

  • DomParser

Implements

Index

Constructors

constructor

Methods

parseHtmlString

  • parseHtmlString(str: string, path: string): HTMLDocument
  • Parses the string as an HTML Document

    Parameters

    • str: string
    • path: string

    Returns HTMLDocument

parseXhtmlString

  • parseXhtmlString(str: string, path: string): HTMLDocument
  • Parses the string as an XHTML Document

    Parameters

    • str: string
    • path: string

    Returns HTMLDocument

parseXmlString

  • parseXmlString(str: string, path: string): XMLDocument
  • Parses the string as an XML Document

    Parameters

    • str: string
    • path: string

    Returns XMLDocument

Generated using TypeDoc