encoding carriage return in xml



I went through Escape a Carrage Return in XML the above link, so I get that a carriage return should be written as
while writing to xml file.


My question is should it be written as "& amp;#13;" or directly "& # 13;" ? I observed the first pattern in an xml file, hence the question. When i open the xml in IE i see Apple& # 13;

orange with the first pattern, and Apple

orange with the second.


Also should I use & # 10; or < br/ > for line break? Which is better?


In writing to xml(xbrl) file using java PrintWriter. Thanks in advance.( please ignore the spaces after & and # in the character encodings)


No comments:

Post a Comment