Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET4.0
Hi,
 
In my sql table one of column having XML column which hold data in xml format.
 
I want to fetch that sql table xml column data into c# code, stored it into string variable. once i store it into string variable i want to store all xml attribute key and value into Collection.
 
Note-->
XML column data available in below format
<customer>
 <pri_one>1</pri_one> 
<cust_name>A</cust_name>
</customer>
How i achieve it in c#.net?
 
Please suggest any one approach!
Posted 26-Jan-13 18:14pm
Edited 26-Jan-13 19:38pm
v3
Comments
Sandeep Mewara at 27-Jan-13 1:42am
   
And what have you tried so far? Where are you stuck?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You can use the XML parser or LINQ
 
XML Parsing...
XmlDocument xmlDoc= new XmlDocument();
xmlDoc.Load("yourXMLFile.xml");
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 318
1 Richard Deeming 180
2 Sergey Alexandrovich Kryukov 175
3 Yogesh Kumar Tyagi 165
4 ChauhanAjay 156
0 Sergey Alexandrovich Kryukov 6,218
1 OriginalGriff 5,413
2 CPallini 2,473
3 Richard MacCutchan 1,627
4 Abhinav S 1,530


Advertise | Privacy | Mobile
Web01 | 2.8.140814.1 | Last Updated 27 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100