Class XMPPathParser


  • public class XMPPathParser
    extends Object
    This class provides a parser that parses a path string (using prefixes) and a prefix-to-namespace mapping to construct a XMPPath object.
    • Constructor Detail

      • XMPPathParser

        public XMPPathParser()
    • Method Detail

      • parse

        public static XMPPath parse​(String path,
                                    Map<String,​String> prefixContract)
                             throws XMPPathParserException
        Creates an XMPPath object by parsing an XMP path String and creates one path segment for each detected segment in the path.
        Parameters:
        path - Path string to parse
        prefixContract - A Map that contains the mapping between Namespaces and their prefixes. This must be provided to interpret the path correctly.
        Throws:
        XMPPathParserException - If the path has an invalid format or a prefix is found that is not defined in the prefixContract
        IllegalArgumentException - If path or prefixContract is null.