Package org.apache.camel.language.xpath
Annotation Interface XPath
@Retention(RUNTIME)
@Documented
@Target({FIELD,METHOD,PARAMETER})
@LanguageAnnotation(language="xpath",
factory=XPathAnnotationExpressionFactory.class)
public @interface XPath
Used to inject an XPath expression into a field, property, method or parameter when using
Bean Integration.
-
Required Element Summary
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
Whether to log namespaces which can assist during troubleshootingorg.apache.camel.support.language.NamespacePrefix[]
Namespace prefix mappingsboolean
Whether to enable pre-compiling the xpath expression during initialization phase.Class
<?> The desired return type from the evaluated XPath expression.Source to use, instead of message body.
-
Element Details
-
value
String valueThe XPath which will be applied -
namespaces
org.apache.camel.support.language.NamespacePrefix[] namespacesNamespace prefix mappings- Default:
{@org.apache.camel.support.language.NamespacePrefix(prefix="soap", uri="http://www.w3.org/2003/05/soap-envelope"), @org.apache.camel.support.language.NamespacePrefix(prefix="xsd", uri="http://www.w3.org/2001/XMLSchema")}
-
resultType
Class<?> resultTypeThe desired return type from the evaluated XPath expression.- Default:
java.lang.Object.class
-
source
String sourceSource to use, instead of message body. You can prefix with variable:, header:, or property: to specify kind of source. Otherwise, the source is assumed to be a variable. Use empty or null to use default source, which is the message body.- Default:
""
-
logNamespaces
boolean logNamespacesWhether to log namespaces which can assist during troubleshooting- Default:
false
-
preCompile
boolean preCompileWhether to enable pre-compiling the xpath expression during initialization phase. pre-compile is enabled by default. This can be used to turn off, for example in cases the compilation phase is desired at the starting phase, such as if the application is ahead of time compiled (for example with camel-quarkus) which would then load the xpath factory of the built operating system, and not a JVM runtime.- Default:
true
-