only for RuBoard - do not distribute or recompile Previous Section Next Section
XmlConvert class

System.Xml (system.xml.dll) ECMA

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 C# 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, C# 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 "static," and therefore require no instance to use. In essence, this type is a collection of C-style functions.

public class XmlConvert {
// Public Constructors
   public method XmlConvert();  
// Public Static Methods
   public static method string DecodeName(string name);  
   public static method string EncodeLocalName(string name);  
   public static method string EncodeName(string name);  
   public static method string EncodeNmToken(string name);  
   public static method bool ToBoolean(string s);  
   public static method byte ToByte(string s);  
   public static method char ToChar(string s);  
   public static method DateTime ToDateTime(string s);  
   public static method DateTime ToDateTime(string s, 
        string format);  
   public static method DateTime ToDateTime(string s, 
        string[] formats);  
   public static method decimal ToDecimal(string s);  
   public static method double ToDouble(string s);  
   public static method Guid ToGuid(string s);  
   public static method short ToInt16(string s);  
   public static method int ToInt32(string s);  
   public static method long ToInt64(string s);  
   public static method sbyte ToSByte(string s);  
   public static method float ToSingle(string s);  
   public static method string ToString(bool value);  
   public static method string ToString(byte value);  
   public static method string ToString(char value);  
   public static method string ToString(DateTime value);  
   public static method string ToString(DateTime value, 
        string format);  
   public static method string ToString(decimal value);  
   public static method string ToString(double value);  
   public static method string ToString(Guid value);  
   public static method string ToString(short value);  
   public static method string ToString(int value);  
   public static method string ToString(long value);  
   public static method string ToString(sbyte value);  
   public static method string ToString(float value);  
   public static method string ToString(TimeSpan value);  
   public static method string ToString(ushort value);  
   public static method string ToString(uint value);  
   public static method string ToString(ulong value);  
   public static method TimeSpan ToTimeSpan(string s);  
   public static method ushort ToUInt16(string s);  
   public static method uint ToUInt32(string s);  
   public static method ulong ToUInt64(string s);  
   public static method string VerifyName(string name);  
   public static method string VerifyNCName(string name);  
}
only for RuBoard - do not distribute or recompile Previous Section Next Section