New line characters in XML

How to put newline/carriage return characters into an XML document? The typical string with escape sequence like ‘\n’ can’t be used, because this string has no special meaning in XML and it’s hidden when viewing in any editor or IDE. If this character is interpreted into html and trying to display in browsers, it would be just an empty character. In windows, instead we need to use hexadecimal escaped character: &#10; for newline or &#13;or &#xD; or &#xA; to represent a carriage return. In browser, we would have to handle these characters by converting them to html tag <br>.