Note that there are some explanatory texts on larger screens.

plurals
  1. POParsing GML data using C# Linq to XML
    primarykey
    data
    text
    <p>I know this is most likly very basic and been asked a thousand times but for some reason I just can't get it to work.</p> <p>I have a gml file that looks like the following:</p> <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt; &lt;schema xmlns='http://www.w3.org/2000/10/XMLSchema' xmlns:gml='http://www.opengis.net/gml' xmlns:xlink='http://www.w3.org/1999/xlink' xmlns:xsi='http://www.w3.org/2000/10/XMLSchema-instance' xsi:schemaLocation='http://www.opengis.net/gml/feature.xsd'&gt; &lt;gml:Polygon srsName='http://www.opengis.net/gml/srs/epsg.xml#4283'&gt; &lt;gml:outerBoundaryIs&gt; &lt;gml:LinearRing&gt; &lt;gml:coord&gt; &lt;gml:X&gt;152.035953&lt;/gml:X&gt; &lt;gml:Y&gt;-28.2103190007845&lt;/gml:Y&gt; &lt;/gml:coord&gt; &lt;gml:coord&gt; &lt;gml:X&gt;152.035957&lt;/gml:X&gt; &lt;gml:Y&gt;-28.2102020007845&lt;/gml:Y&gt; &lt;/gml:coord&gt; &lt;gml:coord&gt; &lt;gml:X&gt;152.034636&lt;/gml:X&gt; &lt;gml:Y&gt;-28.2100120007845&lt;/gml:Y&gt; &lt;/gml:coord&gt; &lt;gml:coord&gt; &lt;gml:X&gt;152.034617&lt;/gml:X&gt; &lt;gml:Y&gt;-28.2101390007845&lt;/gml:Y&gt; &lt;/gml:coord&gt; &lt;gml:coord&gt; &lt;gml:X&gt;152.035953&lt;/gml:X&gt; &lt;gml:Y&gt;-28.2103190007845&lt;/gml:Y&gt; &lt;/gml:coord&gt; &lt;/gml:LinearRing&gt; &lt;/gml:outerBoundaryIs&gt; &lt;/gml:Polygon&gt; &lt;/schema&gt; </code></pre> <p>All I need to be able to do is read the X and Y from each gml:coord node. I am using C# 3.0 and LINQ so it should be easy but everything I try just returns empty results.</p> <p>I have only done xml parsing in VB so the C# way is a bit foreign to me at the moment.</p> <p>Thanks, Nathan</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload