Package org.geotools.xsd.impl.jxpath
Class JXPathUtils
Object
JXPathUtils
Contains utility methods to create safe
JXPathContext
objects.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JXPathContext
newSafeContext
(Object contextBean, boolean lenient) Creates aJXPathContext
that disables calling Java methods from XPath expressions.static JXPathContext
newSafeContext
(Object contextBean, boolean lenient, NamespaceSupport ns, boolean declared) Creates aJXPathContext
that disables calling Java methods from XPath expressions.
-
Constructor Details
-
JXPathUtils
public JXPathUtils()
-
-
Method Details
-
newSafeContext
Creates aJXPathContext
that disables calling Java methods from XPath expressions.- Parameters:
contextBean
- the root node objectlenient
- whether the context is in lenient mode- Returns:
- the context
-
newSafeContext
public static JXPathContext newSafeContext(Object contextBean, boolean lenient, NamespaceSupport ns, boolean declared) Creates aJXPathContext
that disables calling Java methods from XPath expressions.- Parameters:
contextBean
- the root node objectlenient
- whether the context is in lenient modens
- the namespacesdeclared
- true to include all declared prefixes; false for all active prefixes- Returns:
- the context
-