JavaScript is disabled on your browser.
Skip navigation links
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.htmlunit.util

Class XmlUtils



  • public final class XmlUtils
    extends Object 
    INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
    Provides facility method to work with XML responses.
    Author:
    Marc Guillemot, Ahmed Ashour, Sudhan Moghe, Ronald Brill, Chuck Dumont, Frank Danek
    • Method Detail

      • appendChild

        public static void appendChild(SgmlPage page,
         DomNode parent,
         Node child,
         boolean handleXHTMLAsHTML)
        Recursively appends a Node child to DomNode parent.
        Parameters:
        page - the owner page of DomElements to be created
        parent - the parent DomNode
        child - the child Node
        handleXHTMLAsHTML - if true elements from the XHTML namespace are handled as HTML elements instead of DOM elements
      • appendChild

        public static void appendChild(SgmlPage page,
         DomNode parent,
         Node child,
         boolean handleXHTMLAsHTML,
         Map<Integer,List<String>> attributesOrderMap)
        Recursively appends a Node child to DomNode parent.
        Parameters:
        page - the owner page of DomElements to be created
        parent - the parent DomNode
        child - the child Node
        handleXHTMLAsHTML - if true elements from the XHTML namespace are handled as HTML elements instead of DOM elements
        attributesOrderMap - (optional) the one returned by getAttributesOrderMap(Document)
      • lookupNamespaceURI

        public static String lookupNamespaceURI(DomElement element,
         String prefix)
        Search for the namespace URI of the given prefix, starting from the specified element. The default namespace can be searched for by specifying "" as the prefix.
        Parameters:
        element - the element to start searching from
        prefix - the namespace prefix
        Returns:
        the namespace URI bound to the prefix; or null if there is no such namespace
      • lookupPrefix

        public static String lookupPrefix(DomElement element,
         String namespace)
        Search for the prefix associated with specified namespace URI.
        Parameters:
        element - the element to start searching from
        namespace - the namespace prefix
        Returns:
        the prefix bound to the namespace URI; or null if there is no such namespace
      • getAttributesOrderMap

        public static Map<Integer,List<String>> getAttributesOrderMap(Document document)
        Returns internal Xerces details about all elements in the specified document. The id of the returned Map is the nodeIndex of an element, and the list is the array of ordered attributes names.
        Parameters:
        document - the document
        Returns:
        the map of an element index with its ordered attribute names
Skip navigation links
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

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

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