Click here to Skip to main content
12,451,202 members (51,087 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# XML
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:
<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 9-Aug-12 20:38pm
Updated 9-Aug-12 20:40pm
v2

1 solution

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

Solution 1

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[^]
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 10 Aug 2012
Copyright © CodeProject, 1999-2016
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