I am just starting with
so apologies if the answer is obvious.
I am trying to extract attributes from an XML file, which appears to have the same element name wrapped within itself. This extract shows the problem:
It reads the first "osgb:heightAboveDatum"
which has no value, but then appears to skip the second line and so misses the value there. It reads the next line "osgb:accuracyOfHeightAboveDatum"
OK presumably because it has a different element?
Any help appreciated!
The above XML didn't format correctly - it should be:
I'm using XMLTextReader to get the data from each element and this is the code for the heightAboveDatum element:
If GMLReader.Name.ToString = "osgb:HeightAboveDatum" And GMLReader.NodeType <> XmlNodeType.EndElement Then
heightAboveDatum = Trim(GMLReader.ReadString())
It's returning an empty string as I presume it's not reading the child node containing the data value.