Class DomToXPathMap

java.lang.Object
org.docx4j.model.datastorage.DomToXPathMap

public class DomToXPathMap extends Object
  • Field Details

    • log

      private static org.slf4j.Logger log
    • histgrams

      private final Stack<Histgram> histgrams
    • document

      private Document document
    • pathMap

      private Map<String,String> pathMap
    • countMap

      private Map<String,Integer> countMap
      count the number of child nodes; used for pre-calculation of (1) repeat xpaths, and (2) certain simple conditions. By default, an entry counts the number of children which are the same element as the first element child, since this is what we need for repeats. If there are elements with different names, the count is put in the map with PREFIX_ALL_NODES prefix.
      Since:
      3.3.6
    • PREFIX_ALL_NODES

      public static final String PREFIX_ALL_NODES
      See Also:
  • Constructor Details

    • DomToXPathMap

      public DomToXPathMap(Document document)
  • Method Details

    • getPathMap

      public Map<String,String> getPathMap()
    • getCountMap

      public Map<String,Integer> getCountMap()
    • map

      public void map()
    • getLocalName

      private String getLocalName(Node sourceNode)
    • walkTree

      public void walkTree(Node sourceNode)
    • getXPath

      public String getXPath()
      Gets the XPath to the current element.