XML support featured in the DataSet class for reading and writingdata as XML

M

mike myers

The following get methods are supported;


The GetXml Method

This method returns a string that contains an XML representation of the actual data that is stored in the DataSet, the syntax is public string GetXml();

The GetXmlSchema Method

This method returns the schema for an XML representation of the data stored in the DataSet, it returns the XML as a string so its more verbose than the WriteXmlSchema method to write XML to a file. The syntax is public string GetXmlSchema();

InferXmlSchema Method

This method applies XML schema to the DataSet by taking an XML document provided in a TextReader, XmlReader, Stream object or a specified disk file.
The syntax is;

public void InferXmlSchema(string,string[]);
public void InferXmlSchema(TextReader,string[]);
public void InferXmlSchema(Stream,Stream[]);
public void InferXmlSchema(XmlReader,string[]);

WriteXml Method

This method writes the XML representation of the data in the DataSet object to a TextWriter object, an XmlWriter object, a Stream object or directly to a specified disk file. The syntax is;

public void WriteXml(string);
public void WriteXml(TextWriter);
public void WriteXml(Stream);
public void WriteXml(XmlWriter);

WriteXmlSchema Method

This method writes the XML schema of the DataSet to a TextWriter object, an XmlWriter object, a Stream object or directly to a specified disk file. The syntax is;

public void WriteXmlSchema(string);
public void WriteXmlSchema(TextWriter);
public void WriteXmlSchema(Stream);
public void WriteXmlSchema(XmlWriter);

ReadXml Method

This method reads the XML data (including a schema when present) into the DataSet from a TextReader, XmlReader, Stream object or directly to a specified disk file. The syntax is;

public void ReadXml(string);
public void ReadXml(TextReader);
public void ReadXml(Stream);
public void ReadXml(XmlReader);

ReadXmlSchema Method

This method reads the XML schema describing the contents of the DataSet to a TextReader, XmlReader, and Stream object or directly to a specified disk file.
The syntax is;

public void ReadXmlSchema(string);
public void ReadXmlSchema(TextReader);
public void ReadXmlSchema(Stream);
public void ReadXmlSchema(XmlReader);

http://www.liquid-technologies.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,828
Messages
2,569,736
Members
45,518
Latest member
vlonesshirt

Latest Threads

Top