2023-06-02

Change the content of ${body} in Apache Camel XML DSL

Given the following XML ${body} payload object

<list>
   <library>
      <name>xxx</name>
      <address>
         <line1>aaa</line1>
         <line2>bbb</line2>
         <line3>ccc</line3>
      </address>
   </library>
   <book>
      <author>
         <name>John</name>
         <id>4324234</id>
      </author>
      <title>New Book</title>
      <isbn>dsdaassda</isbn>
   </book>
   <book>...</book>
   <book>...</book>
</list>

I want to append the tag id to name. So, based on that example name would be = John, 4324234

I have a minimal experience on this. I cannot use java either. I thought convert it to string and do the replacement, but I don't know how to do it without coding.

Any help will be appreciated.



No comments:

Post a Comment