How do I add whitespace in XML?

How do I add whitespace in XML?

Answer #1

Hi,

XML considers four characters to be whitespace: the carriage return (\r or ch(13)), the linefeed (\n or ch(10)), the tab(\t), and the spacebar (‘ ‘). In XML documents, there are two types of whitespace:

W3C XSLT specification provides two elements— xsl:strip-space and xsl:preserve-space— to handling whitespaces. The xsl:strip-space specifies the XML elements that should have whitespace text nodes (that is, text nodes composed entirely of whitespace characters) stripped. Note that the xsl:strip-space only affects nodes that are pure whitespace. xsl:strip-space can list as a set of element separated by whitespaces or use wildcards such as *. The xsl:preserve-space has similar syntax but does just the opposite to the xsl:strip-space .

I hope that helps. I really have no idea what it means!

Source: http://www.oracle.com/technology/pub/articles/wang-whitespace.html

More Like This