I need to store a string in XML, and I want to preserve Carriage returns and Line Feeds. What is the normal way of doing this? Say I have the string (in my program) as:
"Start \n Finish"
My understanding is that CRs cannot be inside the string itself in XML as in:
TEXT="start
finish"
because the CR is just treated as white space and will be skipped when reading. Or is the above legitimate?
Should I use the 
 and 
 ? as in:
TEXT="Start 
 Finish"
Or is there some other standard way of doing this?
Thanks in advance!
noleander
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I need to store a string in XML, and I want to preserve Carriage returns and Line Feeds. What is the normal way of doing this? Say I have the string (in my program) as:
"Start \n Finish"
My understanding is that CRs cannot be inside the string itself in XML as in:
TEXT="start
finish"
because the CR is just treated as white space and will be skipped when reading. Or is the above legitimate?
Should I use the 
 and 
 ? as in:
TEXT="Start 
 Finish"
Or is there some other standard way of doing this?
Thanks in advance!
noleander
I have the same problem, I want to have text like
<data>
151,151
149,149
147,147
</data>
I can not find a way to do that in tinyXML, anybody can help?
Same problem. I have an XML file like this one:
<comment>
line 1
line 2
line 3
</comment>
When I read the XML file the Carriage Returns are not treated. I tried to use the 
 character and it worked but it's not very interesting.
Why the XMLSpy editor recognizes these characters but not TinyXml ?