Six Stars

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? 

1 REPLY
Twelve Stars TRF
Twelve Stars

Re: Removing header from a Document variable in Talend job

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

TRF