Storing multiline text in an XML Field

kingjon

New member
Joined
Aug 23, 2006
Messages
2
Programming Experience
1-3
Hi,

I've currently got an XML file, which is read into a dataset. In one of the XML fields, I need to store a string which will eventually be written to a text file (the string will also contain multiple lines of text). Since I need to store multiple lines of text in the XML field, my field is as follows:

<Field>Text Line Number 1 & VbCrLf & Text Line Number 2</Field>

My theory behind this, is that when it's read into the dataset, then a String, and written to a file, it will write the following in the file:

Text Line Number 1
Text Line Number 2

However, this isn't the case, since it takes the above XML field as a string literal, and just prints out the entire line of text:

Text Line Number 1 & VbCrLf & Text Line Number 2

Not quite what I'm after!! Does anyone have any ideas of how i can store text in an XML field, that I can later write to multiple lines (using an XML field per line is not possible, since there will often be 20+ lines to be written!)?

Cheers,
Jon.
 
So answering my own question, I noticed I can store my XML like this:

<Field>Text Line Number 1
Text Line Number 2</Field>

Is this reliable? and is there an alternative, since it'll start making my XML file look very messy quite quickly!
 
Back
Top