I am trying to import the Google earth kml xml file into the application, but I cannot get the xDocument syntax to do what I want to, I wonder if anyone can suggest a way to read the kml xml file.
I understand the basics of XML import, but I canβt get anything while working with xDocument and Linq, ideally I would like to get each Placemark as an object and add them to my db-driven Entity Framework. Any suggestions on how I should do this would be great, as I am just starting out with Linq and can do with some pointers. Xml laid out below
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.2"> <Document> <Placemark> <name>XXX</name> <description>XXX</description> <styleUrl>XXX</styleUrl> <Point> <coordinates>XXX</coordinates> </Point> </Placemark> <Placemark> <name>XXX</name> <description>XXX</description> <styleUrl>XXX</styleUrl> <Point> <coordinates>XXX</coordinates> </Point> </Placemark> </Document> </kml>
c # xml import linq entity-framework
norbert
source share