Click here to Skip to main content
Rate this: bad
good
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
Edited 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
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 9,225
1 OriginalGriff 5,395
2 Peter Leow 4,100
3 Maciej Los 3,540
4 Abhinav S 3,333


Advertise | Privacy | Mobile
Web02 | 2.8.140415.2 | Last Updated 10 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid