Class SimpleXPathEvaluator


  • public class SimpleXPathEvaluator
    extends java.lang.Object
    This class is used for parsing the configuration parameters of the XML Parser2. After it compiles everything needed into an array it is used for matching elements found in the XML being parsed. Also this class keeps track of the elements that the XML Parser2 have entered in. Since XML Parser2 could be in only one mode (Input or Output) the THIS CLASS IS FOR INTERNAL USAGE ONLY! MAY CHANGE IN THE FUTURE!
    Since:
    7.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String ELEMENT_SEPARATOR
      The character that separates each element in a path.
      static byte EXACT_MATCH_FOUND
      returned by the match(String, String, String) method and means that an exact match is found for the specified path
      static byte NO_MATCH_FOUND
      returned by the match(String, String, String) method and means that no match is found for the specified path
      static byte PARTIAL_MATCH_FOUND
      returned by the match(String, String, String) method and means that the provided element is part of the specified path
      static java.lang.String PREFIX_LOCALNAME_SEPARATOR
      The character that separates the prefix from the local name in a regular element.
      static java.lang.String WILDCARD
      The character that represents a QualifiedElementName or just an ElementName in the provided xpath string.
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleXPathEvaluator​(java.lang.String simpleXPath, java.lang.String namespaceMap, java.lang.String attributesDeclaration, java.lang.String[] entryTag, Log log)
      Constructor for the class.
    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NO_MATCH_FOUND

        public static final byte NO_MATCH_FOUND
        returned by the match(String, String, String) method and means that no match is found for the specified path
        See Also:
        Constant Field Values
      • EXACT_MATCH_FOUND

        public static final byte EXACT_MATCH_FOUND
        returned by the match(String, String, String) method and means that an exact match is found for the specified path
        See Also:
        Constant Field Values
      • PARTIAL_MATCH_FOUND

        public static final byte PARTIAL_MATCH_FOUND
        returned by the match(String, String, String) method and means that the provided element is part of the specified path
        See Also:
        Constant Field Values
      • WILDCARD

        public static final java.lang.String WILDCARD
        The character that represents a QualifiedElementName or just an ElementName in the provided xpath string.
        See Also:
        Constant Field Values
      • ELEMENT_SEPARATOR

        public static final java.lang.String ELEMENT_SEPARATOR
        The character that separates each element in a path.
        See Also:
        Constant Field Values
      • PREFIX_LOCALNAME_SEPARATOR

        public static final java.lang.String PREFIX_LOCALNAME_SEPARATOR
        The character that separates the prefix from the local name in a regular element.
        See Also:
        Constant Field Values
    • Constructor Detail

      • SimpleXPathEvaluator

        public SimpleXPathEvaluator​(java.lang.String simpleXPath,
                                    java.lang.String namespaceMap,
                                    java.lang.String attributesDeclaration,
                                    java.lang.String[] entryTag,
                                    Log log)
        Constructor for the class.
        Parameters:
        simpleXPath - - the Simple XPath String to compile.
        namespaceMap - - the namespaceMap String to compile (e.g. prefix=namespaceURI).
        attributesDeclaration - - the attributes declaration string.
        entryTag - - the element that will be used to wrap each entry when writing. Used only for reference when parsing the Static Attribute Declarations. This parameter should be in one of the following forms: [null, "localName"], ["prefix", "localName"]. If null is passed then no wrapping will be done...
        log - - the log object to use for logging.