AnsweredAssumed Answered

Read entire file into XML element

Question asked by rob.banas on Dec 21, 2016
Latest reply on Sep 18, 2017 by Lee Sobotkin

Hi, I need to read the entire contents of a flat file into an XML element. The length of the file varies.

The input looks like this and simple represents free form text that is entered by users, hence the varying length.

 

 

Line1........<CRLF>
Line2........<CRLF>

Line3........<CRLF>

......

LineX........<CRLF>

 

I need to take all of the lines and map them to 1 element in an XML profile:

<MyDoc>
<fileContents>
Line1.....<CRLF>
Line2.....<CRLF>
Line3.....<CRLF>
...
LineX.....<CRLF>
</fileContents>
</MyDoc>

 

Is this doable without custom scripting, or do I need to look the Data Process shape and building the output using something like SAXBuilder?

 

Thanks!

 

Outcomes