13.07.2015 Views

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

Applied XML Programming for Microsoft .NET.pdf - Csbdu.in

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Table 4-8: Public Methods of the XmlRecordsetWriter ClassMethodWriteStartDocumentDescriptionobjects. This method features overloads to read fromDataSet, DataTable, and DataView objects.Writes the document's prolog, <strong>in</strong>clud<strong>in</strong>g the rootnode with all the needed namespace declarations.For writ<strong>in</strong>g schemas and content, the XmlRecordsetWriter class needs to read<strong>in</strong><strong>for</strong>mation out of some ADO.<strong>NET</strong> objects. For this reason, methods like WriteSchema,WriteContent, and WriteRecordset have the follow<strong>in</strong>g four overloads:public void WriteXXX(DataSet ds){WriteXXX(ds.Tables[0]);}public void WriteXXX(DataSet ds, str<strong>in</strong>g tableName){WriteXXX(ds.Tables[tableName]);}public void WriteXXX(DataView dv){WriteXXX(dv.Table);}public void WriteXXX(DataTable dt){// Actual implementation here}The node layout of an ADO Recordset object is shown <strong>in</strong> Figure 4-10.142

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!