Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Removing header from a Document variable in Talend job

I have an XML stored in a Document type variable in Talend job.

<?xml version="1.0" encoding="UTF-8"?>
<ORDER><HEAD><DOC_STATUS>...</DOC_STATUS></HEAD></ORDER>

 I convert it with the tConvertType to String but I have header that I dont need left:
<?xml version="1.0" encoding="UTF-8"?>

What is the best way to remove this above in Talend? 

Labels (3)
2 Replies
TRF
Champion II
Champion II

Try yourString.replaceAll("^<\?xml.*\?>", "")
idembel2
Creator
Creator

Hi TRF,
I try your suggestion, but i got a bug.
Bellow, code works for me:

yourString.replaceAll("\\<\\?xml(.+?)\\?\\>", "")

Ibrahim