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 xml:space and xml:lang Attributes

The WriteAttributeString method can also be used to write the special XML attributes xml:space and xml:lang. The xml:space attribute determines how white space should be handled within an element's scope. The xml:space attribute has only two possible values: preserve and default. default signals that the parse's white-space processing mode is acceptable for this element. preserve means that all the white space in the element's scope, significant or insignificant, should be preserved. When setting the value of the xml:space attribute, the XmlTextWriter will verifiy that the value is equal to one of the two strings. If it isn't, a System.InvalidOperationException is raised.

The xml:lang attribute specifies ...

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