Class XmlUtilsXercesHelper

java.lang.Object
org.htmlunit.platform.util.XmlUtilsXercesHelper
All Implemented Interfaces:
XmlUtilsHelperAPI

public final class XmlUtilsXercesHelper extends Object implements XmlUtilsHelperAPI
INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
Special processing if the Xerces parser is in use.
  • Constructor Details

    • XmlUtilsXercesHelper

      public XmlUtilsXercesHelper()
      Ctor.
  • Method Details

    • getAttributesOrderMap

      public 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.
      Specified by:
      getAttributesOrderMap in interface XmlUtilsHelperAPI
      Parameters:
      document - the document
      Returns:
      the map of an element index with its ordered attribute names or null if the provided document is not supported
    • getIndex

      public int getIndex(NamedNodeMap namedNodeMap, Map<Integer,List<String>> attributesOrderMap, Node element, int requiredIndex)
      Helper.
      Specified by:
      getIndex in interface XmlUtilsHelperAPI
      Parameters:
      namedNodeMap - the node map
      attributesOrderMap - the order map
      element - the node
      requiredIndex - the required index
      Returns:
      the index or -1 if the provided element is not supported