Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.7.7. Mixed-DOM-and-SAX Example
Procedure 7.1. Task
- Take an XML message such as the following sample:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - You can modify the "supplies" category in the above shopping list by adding two more "pens". To do this, write a simple Groovy script and aim it at the message's <category> elements.
- As a result, the script simply iterates over the <item> elements in the category, and in instances where the category type is "supplies" and the item is "pens", the quantity is incremented by two:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow