use of org.apache.camel.builder.xml.Namespaces in project camel by apache.
the class SetHeaderIssueTest method createRouteBuilder.
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
public void configure() {
// START SNIPPET: example
Namespaces ns = new Namespaces("foo", "urn:cheese");
from("direct:start").unmarshal().string().setHeader("foo", ns.xpath("/foo:person[@name='James']")).filter(ns.xpath("/foo:person[@name='James']")).to("mock:result");
// END SNIPPET: example
}
};
}
use of org.apache.camel.builder.xml.Namespaces in project camel by apache.
the class SplitterWithXqureyTest method createRouteBuilder.
protected RouteBuilder createRouteBuilder() {
return new RouteBuilder() {
public void configure() {
// split the message with namespaces defined
Namespaces namespaces = new Namespaces("one", "http://camel.apache.org/schema/one");
from("direct:endpoint").split().xpath("//one:other", namespaces).to("mock:result");
}
};
}
Aggregations