29.6. 예
예를 들어 메시지 메시지로 간단한 언어를 사용할 수 있습니다.
아래와 같이 스크립트를 헤더로 제공할 수도 있습니다. 여기서 <foo> 태그에서 텍스트를 추출하려면 here we use theECDHE language to extract the text from the <foo> tag.
Object out = producer.requestBodyAndHeader("language:xpath", "<foo>Hello World</foo>", Exchange.LANGUAGE_SCRIPT, "/foo/text()"); assertEquals("Hello World", out);
Object out = producer.requestBodyAndHeader("language:xpath", "<foo>Hello World</foo>", Exchange.LANGUAGE_SCRIPT, "/foo/text()");
assertEquals("Hello World", out);