View Javadoc

1   package org.softnetwork.xml.dom.xpath;
2   
3   import org.w3c.dom.Element;
4   import org.w3c.dom.Node;
5   
6   /**
7    * @author stephane.manciot@ebiznext.com
8    *
9    */
10  public interface XPath {
11      /**
12       * XPATH separator between nodes
13       */
14      String    XPATH_SEPARATOR         = "/";
15      
16      /**
17       * XPATH definition of an attribute
18       */
19      String    XPATH_ATTRIBUTE         = "@";
20      
21      String    XPATH_EQUALITY          = "=";
22      
23      /**
24       * XPATH separator representing the begin of a condition
25       */
26      String    XPATH_COND_BEGIN        = "[";
27      
28      /**
29       * XPATH separator representing the begin of a negative condition definition
30       */
31      String    XPATH_NOT_COND          = "!";
32      
33      /**
34       * XPATH separator representing the end of a condition
35       */
36      String    XPATH_COND_END          = "]";
37      
38      /**
39       * XPATH current element
40       */
41      String    XPATH_CURRENT           = ".";
42      
43      /**
44       * XPATH all child elements
45       */
46      String    XPATH_ALL               = "*";
47      
48      /* XPATH NODE FUNCTIONS */
49      String    XPATH_NAME_FUNCTION     = "name()";
50      
51      String    XPATH_TEXT_FUNCTION     = "text()";
52      
53      /* XPATH NODE POSITION FUNCTIONS */
54      String    XPATH_POS_FUNCTION      = "position()";
55      
56      String    XPATH_LAST_POS_FUNCTION = "last()";
57      
58      String    XPATH_COUNT_FUNCTION    = "count()";
59      
60      Element[] EMPTY                   = new Element[0];
61      
62      Node[]    EMPTY_NODES             = new Node[0];
63      
64  }