Name

XmlConvert

Synopsis

This type is used to convert XML elements into other, non-XML types, such as CLR objects. In particular, it is used to convert XSD types into CLR types, for easy transformation of schema-valid XML documents into .NET objects and back again. It is also used within a variety of other areas, including ADO.NET (for automatic conversion of XML documents into relational tables and rows).

For the most part, .NET programmers use this type indirectly as part of the .NET Web Services stack or else directly in order to convert between XML documents and CLR objects (as part of a home-grown XML-to-RDBMS system, for example).

Note that although a constructor is provided, all methods of any interest are declared shared and therefore require no instance to use. In essence, this type is a collection of C-style functions.

Public Class XmlConvert
                  ' Public Constructors
   Public Sub New() 
' Public Shared Methods
   Public Shared Function DecodeName(
        ByVal name As String) As String  
   Public Shared Function EncodeLocalName(
        ByVal name As String) As String  
   Public Shared Function EncodeName(
        ByVal name As String) As String  
   Public Shared Function EncodeNmToken(
        ByVal name As String) As String  
   Public Shared Function ToBoolean(
        ByVal s As String) As Boolean  
   Public Shared Function ToByte( ByVal s As String) As Byte  
   Public Shared Function ToChar( ByVal s As String) As Char  
   Public Shared Function ToDateTime(
        ByVal s As String) As Date  
   Public Shared Function ToDateTime(ByVal s As String, ByVal ...

Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.