TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Nils Olsson
NA
16
1.6k
How to get child node info from xml file
Mar 9 2018 5:28 AM
Hi,
I need some guidence to get some data out from an XML file using the query function in LINQ to XML
Here is my XML file structure
<data>
<ICAO id="CFS4">
<ICAOName>Ogilvie River</ICAOName>
<Country>Canada</Country>
<State>Yukon Territory</State>
<City>Ogilvie River</City>
<State>Alabama</State>
<Runway id="02">
<Hdg>12.000</Hdg>
<Lat>65.664040</Lat>
<Lon>-138.122025</Lon>
<FSStartLat>65.664124</FSStartLat>
<FSStartLon>-138.121826</FSStartLon>
</Runway>
<Runway id="20">
<Hdg>192.000</Hdg>
<Lat>65.669289</Lat>
<Lon>-138.111313</Lon>
<FSStartLat>65.669205</FSStartLat>
<FSStartLon>-138.111496</FSStartLon>
</Runway>
</ICAO>
</data>
There are thousand and thousands of ICAO nodes.
There are either a Runway node or none in a ICAO node.
There are from 2 to several Runway ids in a Runway node
I need to get a list of all Runway ids with its Hdg, Lat, Lon,FSStartLat and FSStartLon values for a specific ICAO id
I know how to open and query in general, but to get what I want I have so far not managed
How can this be done in the most effective way?
Reply
Answers (
4
)
How to update many to many relationship in entity framework
What is difference between ToList() & AsQueryable()