Hi,
not really the right forum or website at all I guess but I don't know where to ask else.
I am using XML files to read and write settings in my program.
For this task I am using an XMLStreamLibrary which works fine and perfect.
However, when I am trying to write an attribute containing newline characters the library just writes the newline characters into the xml file like this
<content text="Line1
Line2"></content>
but actually it should look like this
<content text="Line1 Line2"></content>
when I am manually replacing the "newline characters" in my string with " " it is writing this
<content text="Line1&#13;&#10;Line2"></content>
because the library is parsing the "&" into "&" which is kind of counter productive in this case.
(It works the other way around though, when I am reading the file in it replaces " " with the appropriate newline characters.)
Any idea how I can overcome this dilemma?
Thanks
Best Regards
*Edit: I am using the XMLStreamWriter in Java, I left this information out because I hoped there is an XML based solution for any kind of library.