How to proceed with xml-to-xml transformation using xpath ?
Issue
- We are working and using the
Data Transformationcamel component but facing some issues which we hope you can clarify us. We started off with the source code and we want to perform an xml-to-xml transformation using xpath. Following is the xml structure.
<Node1 Field1="1" TimeStamp="1994-11-05T08:15:30-05:00" Field2="Production">
<Node2>
<Node3>10</Node3>
<Node4>11</Node4>
</Node2>
</Node1>
- We want to use xpath to get the /Node1/Node2/Node4 value but the value returned is always empty.
- Any idea or suggestion to fix this issue?
- One other question regarding the visual mappings. Is it possible to perform mappings on complex elements, i.e, drap and drop complex elements from one side to another? For example we want to map the SRC xml bellow to the DST xml bellow and drap and drop the "book" complex element so that we do not have to map the entire complex book element.
SRC:
<books>
<book>
<name>somename</name>
</book>
</books>
DST:
<mybooklist>
<book>
<name>somename</name>
</book>
</mybooklist>
Environment
- Red Hat JBoss Fuse
- 6.2.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.