org.deegree.commons.xml
Class XPathUtils
java.lang.Object
org.deegree.commons.xml.XPathUtils
public class XPathUtils
- extends Object
Utilitiy methods for common tasks that involve XPath expressions.
- Version:
- $Revision: $, $Date: $
- Author:
- Markus Schneider, last edited by: $Author: schneider $
Method Summary |
static Set<String> |
extractPrefixes(org.jaxen.expr.Expr xpath)
Returns the namespace prefixes that are used in the given XPath 1.0 expression. |
static Set<String> |
extractPrefixes(String text)
Returns the namespace prefixes that are used in the given XPath 1.0 expression. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XPathUtils
public XPathUtils()
extractPrefixes
public static Set<String> extractPrefixes(String text)
- Returns the namespace prefixes that are used in the given XPath 1.0 expression.
If the expression is not a valid XPath expression, the empty set is returned.
- Parameters:
text
- xpath expression, must not be null
- Returns:
- namespace prefixes used in the expression, never
null
, but can be empty
extractPrefixes
public static Set<String> extractPrefixes(org.jaxen.expr.Expr xpath)
- Returns the namespace prefixes that are used in the given XPath 1.0 expression.
- Parameters:
xpath
- xpath expression, must not be null
- Returns:
- namespace prefixes used in the expresssion, never
null
Copyright © 2011. All Rights Reserved.