read diff .xml file

  • Follow


Hi all,

I want to know the best way of reading different types of .xml files with 
different node structure and stored data in sql.

I know of few ways using XmlDocument, XmlTextReader, etc... but I need to 
find out the best way.

I have not used reading Xml to Dataset or Linq to Xml, how good r they ?

My requirement is to read heaps of xml files with different node structures 
and store data in sql.

Please help.

Thanks to all,



0
Reply Puja 7/9/2010 5:00:10 AM

Puja Parekh wrote:
> Hi all,
> 
> I want to know the best way of reading different types of .xml files with 
> different node structure and stored data in sql.
> 
> I know of few ways using XmlDocument, XmlTextReader, etc... but I need to 
> find out the best way.
> 
> I have not used reading Xml to Dataset or Linq to Xml, how good r they ?
> 
> My requirement is to read heaps of xml files with different node structures 
> and store data in sql.

What do you want to do exactly, simply take an XML file and store it in 
SQL server in a column of type "xml"?
Or do you want to extract some data from an XML document and store the 
data in SQL server in columns of a type other than "xml"?
And which version of .NET and which version of SQL server are you 
talking about?

And to judge what is best we need to define criteria to judge things. 
For instance XmlDocument or XDocument are easier to use than a pure 
XmlReader solution but will definitly consume more memory.


-- 

	Martin Honnen --- MVP Data Platform Development
	http://msmvps.com/blogs/martin_honnen/
0
Reply Martin 7/9/2010 10:57:49 AM

Thanks for the reply, sorry, for missing out some information.

I want to extract data from xml file and store data in SQL server in columns 
of a type  in sql server.

I am using .Net 3.5 and sql server 2005.

One of my friend suggested Linq to Xml. How good is that ?



"Martin Honnen" <mahotrash@yahoo.de> wrote in message 
news:Ow8DXW1HLHA.1660@TK2MSFTNGP04.phx.gbl...
> Puja Parekh wrote:
>> Hi all,
>>
>> I want to know the best way of reading different types of .xml files with 
>> different node structure and stored data in sql.
>>
>> I know of few ways using XmlDocument, XmlTextReader, etc... but I need to 
>> find out the best way.
>>
>> I have not used reading Xml to Dataset or Linq to Xml, how good r they ?
>>
>> My requirement is to read heaps of xml files with different node 
>> structures and store data in sql.
>
> What do you want to do exactly, simply take an XML file and store it in 
> SQL server in a column of type "xml"?
> Or do you want to extract some data from an XML document and store the 
> data in SQL server in columns of a type other than "xml"?
> And which version of .NET and which version of SQL server are you talking 
> about?
>
> And to judge what is best we need to define criteria to judge things. For 
> instance XmlDocument or XDocument are easier to use than a pure XmlReader 
> solution but will definitly consume more memory.
>
>
> -- 
>
> Martin Honnen --- MVP Data Platform Development
> http://msmvps.com/blogs/martin_honnen/ 


0
Reply Puja 7/12/2010 12:01:12 AM

2 Replies
672 Views

(page loaded in 0.072 seconds)


Reply: