Showing posts with label XML. Show all posts
Showing posts with label XML. Show all posts

Thursday, June 24, 2010

DataTable Column Mapping for XML

This article will demonstrate how to determine or set a SYSTEM.DATA.DATATABLE.Column as different XML nodes.

// The user must include into their class:
using System.Data;

// ==========
// To determine if a column is an XML attribute after
// loading data

// --- after loading data into the dataset
// --- and finding the table needed
mytable.Columns[].ColumnMapping == MappingType.;

----> There are 4 types
Attribute
Element
Hidden
SimpleType

Columns.MappingType Gets or Sets the mapping type for the column.

Friday, September 11, 2009

XML and Streams with C#

I wanted to write xml to a stream and back because of the XMLDocument think.

You can go back and forth from XMLDocuments to Streams by:

MemoryStream streamName = new...();

streamName.Write( [ innerXML as byte array ], 0, [size of array]);

XMLDocument document = new ...();

document.Load(streamName);


Now you have a xmldocument.