The given string is interpreted as a limited subset of XPath expressions and split into parts. Each part except the last one is expected to follow precisely the following form: "/" ( prefix ":" ) ? localname ( "[" "@" attName "=" "'" attValue "'" "]" ) ?
The last part must be either "/" "text()"
or "/" "@" attributeName .
- Parameters:
-
| expr | the string to be split as an xpath expression |
- Returns:
- an array of string arrays. All except the last entry in this array is guaranteed to have four elements, with the meaning:
-
[0]: prefix (can be the empty string)
-
[1]: localname (guaranteed not to be empty)
-
[2]: attributeName (can be empty)
-
[3]: attributeValue (is guaranteed to be empty when attributeName is empty; when attributeName is non-empty, and attributeValue is empty, then the attribute must be present but there are no constraints about its value)
The last element in the returned array has either length 1 or length 0. If it is of length 0, then the XPath expression ended in "text()", i.e. the value to be referenced is the text content of the enclosing Element; if it is of length 1, the String contained is guaranteed to be non-null and represents the name of the attribute to be referenced on the enclosing Element.
- Exceptions:
-
| SystemConfigurationException | if expr does not match the expected format. |