.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

How to read all the attributes from an XML element

Posted By: Deco     Posted Date: January 04, 2012    Points:5   Category :Sql Server
i have an XML in the below structure


<Class>
<Student Name='Alwyn' Age='16' Section='A'/>
</Class>


Please help me to read all the attributes by reading the element Student

Responses
Author: Sasi Prabhu             
Posted Date: January 06, 2012     Points: 20   

Try
DataSet ds= new DataSet();
ds.ReadXml(Server.MapPath("FilePath.Xml"),XmlReadMode.ReadSchema);


Thanks & Regards,
Sasi Prabhu.
Author: Deco             
Posted Date: January 10, 2012     Points: 20   

@Sasi Prabhu,

While answering a Question please check the category in which it is posted

I need the code in Sql Server.

Regards,
Deco


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend