public final class XMPPathParser extends Object
Modifier and Type | Method and Description |
---|---|
static XMPPath |
expandXPath(String schemaNS, String path)
Split an XMPPath expression apart at the conceptual steps, adding the root namespace prefix to the first property component.
|
public static XMPPath expandXPath(String schemaNS, String path) throws XMPException
In the most verbose case steps are separated by '/', and each step can be of these forms:
The logic is complicated though by shorthand for arrays, the separating '/' and leading '*' are optional. These are all equivalent: array/*[2] array/[2] array*[2] array[2] All of these are broken into the 2 steps "array" and "[2]".
The value portion in the array selector forms is a string quoted by ''' or '"'. The value may contain any character including a doubled quoting character. The value may be empty.
The syntax isn't checked, but an XML name begins with a letter or '_', and contains letters, digits, '.', '-', '_', and a bunch of special non-ASCII Unicode characters. An XML qualified name is a pair of names separated by a colon.
schemaNS
- schema namespace
path
- property name
XMPException
- Thrown if the format is not correct somehow.
Copyright © 1998–2018 iText Group NV. All rights reserved.