How to use XML Database in Windows Application (C#)
-
Friday, March 02, 2012 7:11 AM
Hello Friends,
now i am use the sql database with c#,
but i want information about the XML database .
How to use this database? with one example
suppose i have following field.
EmpID, EName, Sal, & Loc .
how to use these field with XML Database in C#
Please help me ......
All Replies
-
Friday, March 02, 2012 10:42 AMPlease have a read of http://www.codeproject.com/Articles/13854/Using-XML-as-Database-with-Dataset
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
Jeff Wharton
MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCSD, MCITP, MCDBA
Blog: Mr. Wharty's Ramblings
Twitter: @Mr_Wharty
MC ID: Microsoft Transcript -
Monday, March 05, 2012 7:31 AM
Hi Ramdas Mutkule,
Your question is too general. You can use XML files as the data source of your application. To work with XML data in .NET, you may have a look at the following links:
http://msdn.microsoft.com/en-us/library/orm-9780596529567-04-07.aspx
http://www.w3schools.com/aspnet/aspnet_xml.asp
http://msdn.microsoft.com/en-us/library/84sxtbxh.aspxSince your questino is not related to data access to SQL Server, I would suggest you move to a .NET development forum for more help.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Get or Request Code Sample from Microsoft
If you have any feedback, please tell us.- Marked As Answer by Stephanie LvModerator Friday, March 09, 2012 2:11 AM
- Unmarked As Answer by KJian_ Friday, March 09, 2012 5:05 AM
-
Friday, March 09, 2012 2:14 AM
I'm sorry Stephanie Lv but Jian's reply does not asnwer the question asked by the OP.
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer
Jeff Wharton
MSysDev (C.Sturt), MDbDsgnMgt (C.Sturt), MCT, MCPD, MCSD, MCITP, MCDBA
Blog: Mr. Wharty's Ramblings
Twitter: @Mr_Wharty
MC ID: Microsoft Transcript -
Wednesday, August 29, 2012 6:21 AM
I'm getting here quite some time after you asked the question, but if I may add slightly to the discussion...
It's not clear if you're talking about saving your data to an XML Database or simply to an XML file.
It doesn't look like anyone considered the former possibility and, in fact, I suspect it's not what you want. However, it is worth mentioning. There are a number of XML Database applications in existence (e.g., eXist-db). I am sure their documentation would address the creation of an XML Database, etc. You can query the data in the aforementioned using a number of methods, but XQuery seems a favorite and sample code is available for that, as well.
Regarding the latter possibility, you should be able to find a number of methods relatively easy with a quick google search. I'll mention one here, though - the use of the XmlSerializer. A nice, simple example of its use is here: http://msdn.microsoft.com/en-us/library/bdxxw552
Best of luck,
TR

