Simplest way to remove an xml element and children, from input an XML doc/string (dont want to build schema Map, just simple xpath remove)

Six Stars

Simplest way to remove an xml element and children, from input an XML doc/string (dont want to build schema Map, just simple xpath remove)

I want something lightweight.
I don't want to have to go to the trouble of building a giant schema. (the xml is acord; beast).

I just want something simple like how a tExtractXml can xpath to a location in a doc; and get the value; but in my case; I want to remove all elements in the xml of node name <Attachment/>.

Is there a simple; quick way in talend; to find all <Attachment/> elements and remove them; without having to define the entire mammoth acord xml schema?

Don't want to build tHMap Structures, tXMLMap, tAdvancedFileOutputXML; etc...dont want to build schemas to do this.

Just blindly xpath to find and remove <Attachment/> element node (and childnodes).

I am thinking I will have to do this in tJavaRow; but wanted to make sure there isn't a talend component that can do this natively that I am missing.

 

Ten Stars

Re: Simplest way to remove an xml element and children, from input an XML doc/string (dont want to build schema Map, just simple xpath remove)

for this huge xml there's a nice import way... use tXMLMap and check the screenshot. (ignore the step2 its from a different example)

in your output define a Document and do the same and remove the specific attacment element.
setLoop.jpg

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch