Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
DaveTaylor
Contributor III
Contributor III

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.

 

Labels (4)
1 Reply
Jesperrekuh
Specialist
Specialist

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.
0683p000009LzgH.jpg