O'Reilly logo

Microsoft® .NET Compact Framework Kick Start by Ronnie Yates, Erik Rubin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing White-Space Characters

There may be times when you need to format your document manually. The WriteWhitespace method can be used to write white space to your XML document. It is important to note that for the white space to be considered significant, the containing element should have the xml:space attribute value set to preserve. This is because significant white space is defined as any white space inside a mixed content model or any white space inside the scope of an xml:space="preserve" attribute. The xml:space attribute can appear on any element, but an element's content model can be marked as a mixed content only in the document's DTD. Since the XmlTextReader does not recognize DTD information, the only way to mark white space as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required