1
Answer

Extract values from string containing xml data

Bindu

Bindu

12y
1.5k
1
Hi..
 
my string Contains data in xml formatt
For example:
 
<relatedCategory>
<count>351</count>
<name>Computer-Wholesale & Manufacturers</name>
</relatedCategory>
<relatedCategory>
<count>278</count>
<name>Computer Software & Services</name>
</relatedCategory>
<relatedCategory>
<count>271</count>
<name>Computer Software Publishers & Developers</name>
</relatedCategory>

i want to extract values from this like 
 
351
Computer-Wholesale & Manufacturers
 
i tried some code but it is not getting those values.it is showing just count,name.
 
Thanks in advance...
Answers (1)