read diff .xml file

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
Puja
7/9/2010 5:00:10 AM
dotnet.xml 7266 articles. 0 followers. Follow

2 Replies
805 Views

Similar Articles

[PageSpeed] 31

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
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
Puja
7/12/2010 12:01:12 AM
Reply:

Similar Artilces:

Reading .wks file
Greetings...according to the Excel "help" file, as well as the file extension listing, I *should* be able to read an *.wks file, but Excel insists that it cannot. I am pretty sure the file was created in Microsoft Works. Is there a converter somewhere that I can download/install? Cheers - S2 Excel can read Works 2.0, not later. You have to save them in Works as excel files or Works 2.0 or get a commercial converter. -- Regards, Peo Sjoblom "Skip Stocks" <anonymous@discussions.microsoft.com> wrote in message news:AFC110E0-641D-4D87-9464-B930CC41CF02@microsoft....

Inserting text from a .txt file
I'm trying really hard to jump on the bandwagon and migrate from Outlook Express to Outlook, but the more I try, the more frustrated I get. Anyway, here is my question: How do I insert the text from a text file into my e-mail document. I am using the rtf editor. thank you, ~alan copy/paste? "~~Alan~~" <alan.shepro_NOSPAM@verizon.net> wrote in message news:%23%23AwZrIKEHA.1264@TK2MSFTNGP12.phx.gbl... > I'm trying really hard to jump on the bandwagon and migrate from Outlook > Express to Outlook, but the more I try, the more frustrated I get. > > Anywa...

xml config file...
hello, I ve a Windowsapplication with a configuration file app.config... (it's in xml) code app.config: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name = "MyNameValueSection" type="System.Configuration.NameValueSectionHandler" /> </configSections> <MyNameValueSection> <add key="MyKey" value="MyValue" /> </MyNameValueSection> <appSettings> <add key="test" value="MeinInhalt" /> </appSettings> </configurati...

"File access denied" to PST file
I have gone from Windows 2000 running Outlook 2000 to Windows XP Pro running Outlook 2003. When I try opening my saved .pst file in the new Outlook I get a message saying "File access denied. You do not have permission required to access to file mailbox.pst" I am logged on as Administrator, as I was on the old install. How do I open my saved mailbox.pst or archive.pst? TIA How did you try opening it? is this a local .pst file? If it is not on your C: drive, is it marked Read-Only? --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion int...

File won't open as read only
I have a file that is in use, but another person opens it and it doeasn't display the "file is in use" message. Is there a setting or fix? Hi have you shared this file? -- Regards Frank Kabel Frankfurt, Germany John wrote: > I have a file that is in use, but another person opens it > and it doeasn't display the "file is in use" message. Is > there a setting or fix? The file is on a network share. The share has all the appropriate permissions. >-----Original Message----- >Hi >have you shared this file? > >-- >Regards >Frank Ka...

Weird files
Just noticed I've got a ton of weird files with names like 2BE48300. The normal files seem to be ok. Any idea what might be producing all these extra files? -- For a list of all the ways technology has failed to improve the quality of life, please press three. ....Alice Kahn Not sure. Perhaps cleaning up your hard drive will help. http://www.officearticles.com/misc/how_to_clean_up_your_hard_drive.htm Are they Excel files? **************************** Hope it helps! Anne Troy www.OfficeArticles.com **************************** "Steve" <teu@qprc.inv> wrote in message...

path of .pst file
Hello everyone, I want to develop a stand alone application to send and recieve mails through MS Outlook.how can i retrieve the path of .pst file from .net application. actually i am thinking of reading the pst file of MS Outlook. is it possible? Thanks in Advance jyoti The pst file is stored in the profile path of the MSOUTLOK Since the path of the pst can be varied by the user, as can its name, ie it neednt be in the install default path, your app would first have to search for the pst, then you would have to figure out if it/which was the current pst. There are alleged to be third ...

Binding ASP.NET Menu to XML
I have created a XmlDocument that contains the exact layout that siteMap uses, and then I bind my Menu object to it: Dim xml As XmlDocument xml = DirectCast(Session("MenuData"), XmlDocument) Dim xmlDS As New XmlDataSource() xmlDS.Data = xml.OuterXml MainMenu.DataSource = xmlDS Dim mb As New MenuItemBinding() mb.DataMember = "SiteMapNode" mb.TextField = "Title" mb.NavigateUrlField = "url" MainMenu.DataBindings.Add(mb) MainMenu.DataBind() The problem is when it dis...

How to give other users read-only access to Calendar
I want to allow the group Everyone to have read-only access to a calendar in a certain mailbox. I can do this by granting the permission 'Full mailbox access' (under 'Mailbox rights', under 'Exchange Advanced', for the particular user). However this also allows people to to do everything (ie: they become read-write users). I notice that every mailbox in the system has 'Read permissions' granted to group Everyone. This does not allow other people to open items in the mailbox, but as I understand it, permits Exchange Server and Outlook to do shared meetin...

Delete oldest file first
All, I am looking for some code that deletes the oldest files first in a directory. Any help would be great. Thanks in advance. "karibbean" <sharp_mind@REMOVE.this.email.msn.dotcom> wrote in message news:uJZArpxvFHA.2132@TK2MSFTNGP15.phx.gbl... > I am looking for some code that deletes the oldest files first in a > directory. Any help would be great. Thanks in advance. See FindFirstFile, FindNextFile, FindClose, DeleteFile -- With best wishes, Igor Tandetnik With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea. It is ...

Make excel 2003 default to open files
I have Excel 2003 running alongside 2007. Double clicking an excel file causes it to open in 2007; how do I force 2003 to open the files instead? Sandy You most likely have to reset your file association from 2007 to 2003. Close Excel first and On the Windows Taskbar 1) Start>Run "excel.exe /unregserver"(no quotes)>OK. 2) Start>Run "excel.exe /regserver"(no quotes)>OK. See the space between exe and /regserver You might have to designate a full path to excel.exe for Office 2003 In that case Start>Run "C:\your path to\office11\excel.exe" ...

Read mail arn't marked as read anymore
After an SP upgrade of my Office 2000 the priviewed mail doesnt get marked as read anymore. I have tried to change the time (Tools->Options->Priview pane) from 2 -> 3 -> 4 seconds but nothing works. The only way to mark a mail as read is either to open it or right click it and chose Mark as read. Since I only use the priview pane this is very anoying for me. Is this a bug or has some setting changed with the SP? ...

scrambled excel file
Hi AGAIN. I'm trying to open a file that was deleted and later retrieved through GetData Back. It has an .xls extension, but when I try to open it, it's just symbols. Is there some way I can retrieve the proper info. from that file? Do I have to save it as something else? I really need this file back - l mean life & death!! I will attach the file to see if someone can figure this out for me. Thanks again for your help. Your advice last time was great. Sandy Attachment filename: wolf_info liz.xls Download attachment: http://www.excelforum.com/attachment.ph...

reading confirmation
Good day, I have a problem with outlook. When they send a message to me that demands the shipment of a reading confirmation, even if I accept, the reading confirmation does not come received from the sender. Someone knows from what depends and in which way I can resolve the problem? Thanks for the eventual answers. Niki In news:eht7fo$251$1@fata.cs.interbusiness.it, Niki <nicola.pantaleo@yahoo.it> typed: > Good day, > > I have a problem with outlook. When they send a message to me that > demands the shipment of a reading confirmation, even if I accept, the > read...

"Unblock" feature should be optional when reading e-mail in CRM
When viewing e-mail messages in CRM, a line appears saying "Unblock" to allow the full message content to be read. Can this be made a configurable server or security setting? We are trying to reduce "clicks" as much as possible. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agre...

Cannot delete xml file - file based event scheduling
Hi, I have a report scheduled with File based event scheduling in CR XI Server version 11.5. The report is created with XML file as its datasource. The report will be triggered if the event of xml file is created in the source directory. As per the schedule, it will look for the event to occur every 1 minute. Since I need to enerate this report everytime the file comes into the directory, I have to delete the file after he report is generated, so that, next time the file comes in, the report will be generated again. After the report is run for the first time successfuly as the event occurs...

Previously used file option GONE? help please
Win98SE 'Office XP Pro' In Excel I am unable to find how to enable "open previosly used files" or words to that effect. I have checked in "options" but cannot see it there. When I used it previouly I was able to select the number of files last used, which would be available for me to select when starting EXCEL. TIA Hi do you mean the option in the 'File' menu (at the bottom)? -- Regards Frank Kabel Frankfurt, Germany Terry wrote: > Win98SE > 'Office XP Pro' > > In Excel I am unable to find how to enable "open previosly used...

The memory could not be "read".
I'm at work yesterday afternoon responding to e-mail on my desktop, and Adobe pops up from the toolbar with a notice that there is an update available for Acrobat. I accept the download, keep plugging away at my e-mail, and install it when it's done. It runs through the install, tells me that I should restart, but I ignore it and keep working. It's near the end of the day and I'm going to be going home soon anyways. I forgot to turn it off when I left. Came in this morning, restarted it through the Start menu, and rebooted. Upon reaching the "Ctrl+Alt+Del" ...

how can i copy a document to a CD without making it read only?
HOW CAN I COPY A DOCUMENT TO A CD WITHOUT MAKING IN READ ONLY? You can't. It is not the file, but the media, that is read only. Even CD-RW media does not allow editing a file on the CD. Copy te file from CD to HD, mak edits and if a CD-RW you should be able to burn the edited file back to the CD. hth "DON" wrote: > HOW CAN I COPY A DOCUMENT TO A CD WITHOUT MAKING IN READ ONLY? ...

Unable to Read Japanese Email
I correspond with several Japanese users and can read emails from some of them without a problem, but emails from others are nothing but a series of ?????. In one case, I can read one email but not another from the same sender. Changing the Encoding doesn't help. Sending emails in Japanese to them without a problem...they can read it fine. Would appreciate any suggestions/solutions as I'm stumped. I'm using Outlook 2003 on a Windows XP Home operating system. Japanese language support is installed. ...

Reduce log file size
I cannot reduce the size of my log file which has grown to 43GB. I tried using DBCC SHRINKDATABASE but got the following message and not sure how to shrink it. Any help is appreciated. DBCC SHRINKDATABASE: File ID 1 of database ID 10 was skipped because the file does not have enough free space to reclaim. Cannot shrink log file 2 (MCFICore_log) because of minimum log space required. -- David On Thu, 12 Aug 2010 17:38:03 -0700, DavidC <dlchase@lifetimeinc.com> wrote: >I cannot reduce the size of my log file which has grown to 43GB. I tried >using DBCC SHRI...

Can't open XLS file
When I double-click on the XLS file, empty XLS will open and following message is displayed: “Windows cannot find ‘document name’. Make sure you typed the name correctly, and then try again…” The only way to open my files is to 'drag and drop' them into an already open XLS. Thanks for any advice I bet you could open excel and do File|open to open those workbooks, too. Sometimes one of these works: Tools|Options|General|Ignore other applications (uncheck it) --- or --- Close Excel and Windows Start Button|Run excel /unregserver then Windows Start Button|Run excel /regse...

Transferring read e-mail to another folder
Hello I was wondering whether there was a way in which I could automatically transfer my e-mail that has been read into another folder, such as "Old e-mail" or something like that? Thanks ...

MS Access 2003 Question Opening MS Word file
Is there a way to tell Access to open a MS Word file in the same path where the database is physically located? If so, how would you write the command in VB? Thank you! Application.FollowHyperlink CurrentProject.Path & "\SomeFile.doc" -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "NFL" <NFL@discussions.microsoft.com> wrote in message news:842A9AE4-A399-4907-8951-81AF68233169@microsoft.com... > Is there a way to tell Access to open a MS Word file in the same path > where > the database is physi...

Outlook not marking read emails as read
Hi - We have 1 computer that is doing the oddest thing, anytime the customer reads the last email in his box, exit's out of email and then comes back in, that email is now marked as unread - it's the weirdest thing I have seen in a long time. I uninstalled office XP, rebooted, then reinstalled and applied the 2 service packs, hoping that would fix it, but it didn't. So now I'm stuck and was wondering if anybody out there has any thoughts on what to do.... thanks! Gerri Urban gurban@ci.broomfield.co.us ...