XML Question

Hello XML Gurus

I’ve got an element in my xml wihch is of string type. This is for kind of footer for a particular kind of SAP invoice. It contains long texts… theproblem i’m facing is when i’m extracting htat text from sap and mapping to this field and when viewed thru’ XML it’s coming continuous line which is little weird… Is there any way to insert line-breaks in that free text to format as multiple lines in the same element.
Possibility of having multiple elements for this free text in the XML has been overruled from our tech discussions!!!

Kindly shower ur inputs…



Just to clarify things a bit, does the string contain line-breaks in SAP and these are being stripped out, or is the original text one long string and you’d like to break it up? If it’s the former there’s probably something regarding the parser’s whitespace handling causing this. If the latter, you’d need to decide where to place the line-breaks (some arbitrary number of characters) and insert them via a mapping step.


Unless you have some delimiter type(, or tabspaces)in that free text field
option1)we can use (pub.string:tokenize) and map those to multiple elements.
optin2) is create a fixedlength flatfile schema to parse that freetext into multiple elements.



You could try wrapping your string in a CDATA tag like this

<![CDATA[ this is some

text ]]>

that should preserve the whitespace.