Mauro Matteo

Strip Carriage Returns inside XML Tags

Discussion created by Mauro Matteo on Apr 9, 2019

Good day,

 

i am quite new in PDI and trying to achieve some small tasks.

 

I am reading an XML file through XML Input Stream, the intent is to get the items normalized in a table and then use them as a row per each item.

When opening the XML file, better to say, later on in the transformation, i figured out that inside my XML some elements contain a CR+LF and while then using the STAX functionality they become something like an empty line, or even worst, a line where the first column xml_data_type_description is empty, for example.

 

How can i manipulate those values before they are going through the entire transformation? Stax doesn't seem to give any value manipulation functionality.

 

Example of the XML Portion

 

               <adonis:attribute name="Descripción" type="STRING">Text text text text.

 

 

Entrada: Another text

Salida: Yet another text present

 

 

 

 

</adonis:attribute>

Outcomes