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

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’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

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download