Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

Locating data in my XML file using C#

$
0
0

Hi !

I have a XML file. Here is a snippet:

<Layers Count="9"><Layer Name="layer0" Type="Polygon"><OverlapNames Count="2"><OverlapName Name="layer1"/><OverlapName Name="layer2"/></OverlapNames><CommonNames Count="0"></CommonNames><SnapNames Count="1"><SnapName Name="layer3"/></SnapNames></Layer>

Now, if I have a "layer" is there a quick way to find the node "Layer" that name a name "layer0".

Secondly, is there a way to not only locate the node but return true if the "type" is a certain value? In the above example layer0 is a polygon. So if I encounter a point entity on layer0 and I try to find a layer where name="layer0" and type="point" it should return empty.

Thanks for clarification on right way to parse the XML data file to locate the information I need.

Andrew


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>