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

Converting .NET Compact Framework Data Types through XmlConvert

When writing encoded strings to an XML stream, WriteString and WriteChars encode any special characters so that the XML will be well formed. But what about writing .NET Compact Framework data types to the XML stream? It is not safe to call ToString on the data types, because ToString will not write the correct string. The data types must be written using the XML Schema (XSD) data type mapping defined by the XML Schema Part 2: DataTypes specification (http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/).

The XmlConvert class provides static methods that will convert .NET Compact Framework data types to their correct XML Schema mapping. The class also supplies static methods to convert ...

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