all groups > dotnet xml > march 2005 >
You're in the

dotnet xml

group:

xml using datasets



xml using datasets Ramakant
3/28/2005 12:00:00 AM
dotnet xml: hi i am new at this...whats the better way to read xml files..create a
dataset and read them using xml only for validation ...
or
use xmlreader to validate and read them?
thanks in advance


Re: xml using datasets Derek Harmon
3/29/2005 9:25:30 PM
[quoted text, click to view]

Ramakant,

If you already have an ADO.NET DataSet, then it's more convenient
to use ADO.NET's support for XML. In many cases, the relational
qualities of a DataSet constrain what's acceptable in the way of an
XML document -- but if you're already there and have a mind to
apply ADO.NET style constraints to the DataSet in order to validate
it (due to similarity with your Data Model, for instance) then there's
not much reason to change.

OTOH, if you don't already have an ADO.NET DataSet it seldom
makes sense to shoehorn your XML into one. Developers often
experience difficulties for just this reason -- their XML is not really
relational but they try to push it into a DataSet and have problems.
When your XML isn't relational, using XmlValidatingReader or
XmlDocument (or XPathDocument if you're leaning to processing
the XML with XSLT) is advisable.


Derek Harmon

Re: xml using datasets Ramakant
3/30/2005 10:19:51 AM
thanks a lot


AddThis Social Bookmark Button