camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kenneth H <phecda...@gmail.com>
Subject Help to understand xpath expression in camel routebuilder
Date Mon, 14 Dec 2009 19:10:44 GMT

Hi,

I'm trying to udnerstand a camel example, but I'm stuck at a poit where
xpath is used. The builder is shown here:

public void configure() {
		from(SERVICE_IN) // SERVICE_IN =
jbi:service:http://esbinaction.com/insurance/insuranceDSLRouter
			.convertBodyTo(DOMSource.class) // Convert to DOM tree
			.choice()
				.when(xpath("//ins:TravelInsuranceRequest").namespace("ins",
"http://dzone.com/insurance"))
					.to(TRAVEL_OUT)
				.when(xpath("//ins:CarInsuranceRequest").namespace("ins",
"http://dzone.com/insurance"))
					.to(LUXURY_CAR_OUT, BUDGET_CAR_OUT)
				.otherwise()
					.to(FAILURE_OUT);
	}

My problem is the "when": what exactly does:

when(xpath("//ins:TravelInsuranceRequest").namespace("ins",
"http://dzone.com/insurance"))

mean? 

Can anybody help me?

Kind regards,
Kenneth H
-- 
View this message in context: http://old.nabble.com/Help-to-understand-xpath-expression-in-camel-routebuilder-tp26779963p26779963.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Mime
View raw message