Parsing XML file using C#

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2008
Posts: 13
Reputation: kanjali is an unknown quantity at this point 
Solved Threads: 0
kanjali kanjali is offline Offline
Newbie Poster

Parsing XML file using C#

 
0
  #1
Mar 27th, 2008
Hello ,



I am new to .net(C#) programing.

I need some help in my coding , from experts.

I have the following Xml file,

Ex :

<propertybag name="test" type="a" flags="0">
<property name="help" type="String" flags="0" />
<property name="path" type="String" flags="0">/abc</property>

<propertyname="url"type="String"flags="0">/abc1/Samlple.xml</property>
<property name="icon" type="String" flags="0" />
</propertybag>



Here i want to parse the Xml file till property name = "path" and wants to fetch the "abc" value from that element and same for bellow line.



Please help me out of this, i got stucked here....

i can tell that what method i used..

Expecting your precious reply !!!



Thanks in advance,

Anjali....
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: Parsing XML file using C#

 
0
  #2
Mar 27th, 2008
Read in System.XML.XMLReader and System.XML.XMLDocument classes
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 13
Reputation: kanjali is an unknown quantity at this point 
Solved Threads: 0
kanjali kanjali is offline Offline
Newbie Poster

Re: Parsing XML file using C#

 
0
  #3
Mar 28th, 2008
Originally Posted by RamyMahrous View Post
Read in System.XML.XMLReader and System.XML.XMLDocument classes
Ya , i have used those classes, but iam unable to fetch the perticular value by checking some conditions.......

iam able to read all the elements and values but i need to look for name = "path" and wants to fetch "/abc" value for that...

Please suggest me for this....

Thanks alot,
Anjali ....
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for C#
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC