Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I badly need to know that how to get child elements and attributes from a Xml.I am using XDocument for this matter.I have added XML here with. i have to get Image elelment of 'Point' Elements collections.

Thanks in advance
Monish K M

Example:
XML
<Root>
    <image FileIndex="1"/>
      <Point x="2"  y="3"  text="Head"/>
      <Point x="10" y="50" text="Leg"/>
      <Point x="20" y="50" text="Neck"/>
    </image>
    <image FileIndex="2"/>
      <Point x="10"  y="30"  text="Head"/>
      <Point x="1" y="5" text="Leg"/>
      <Point x="2" y="5" text="Neck"/>
    </image>
    <image FileIndex="3">
      <Point x="8"  y="3"  text="Head"/>
      <Point x="11" y="50" text="Leg"/>
      <Point x="25" y="50" text="Neck"/>
    </image>
</Root>
Posted
Updated 9-Aug-12 20:40pm
v2

1 solution

Check this link. You will get an idea. You have to use the same concept for your xml

http://www.techrepublic.com/blog/programming-and-development/access-xml-data-using-linq-to-xml/594[^]
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900