JavaScript is disabled on your browser.
Skip navigation links
org.htmlunit.javascript.host.dom

Class DOMParser

    • Constructor Detail

      • DOMParser

        public DOMParser()
    • Method Detail

      • jsConstructor

        public void jsConstructor()
        JavaScript constructor.
      • parseFromString

        public Document parseFromString(String str,
         Object type)
        Parses the given Unicode string into a DOM document.
        Parameters:
        str - the Unicode string to be parsed
        type - the MIME type of the string - text/html, text/xml, application/xml, application/xhtml+xml, image/svg+xml. Must not be null.
        Returns:
        the generated document
      • parseFromString

        public static Document parseFromString(HtmlUnitScriptable scriptable,
         String str,
         Object type)
         throws IOException 
        INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
        Parses the given Unicode string into a DOM document.
        Parameters:
        scriptable - the ScriptableObject this belongs to
        str - the Unicode string to be parsed
        type - the MIME type of the string - text/html, text/xml, application/xml, application/xhtml+xml, image/svg+xml. Must not be null.
        Returns:
        the generated document
        Throws:
        IOException - in case of error
      • parseHtmlDocument

        public static Document parseHtmlDocument(HtmlUnitScriptable scriptable,
         WebResponse webResponse,
         WebWindow webWindow)
         throws IOException 
        INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
        Parses the given Unicode string into a DOM document.
        Parameters:
        scriptable - the ScriptableObject this belongs to
        webResponse - the response to be parsed
        webWindow - the window
        Returns:
        the generated document
        Throws:
        IOException - in case of error
Skip navigation links

Copyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /