It seems to me that you should have some standards for your XML. You
shouldn't be changing attribute names, element names, etc. It's hard
to parse an XML file with no standards.
Here is a way to dynamically read attributes once you are at the
element that has the attributes.
While reader.MoveToNextAttribute()
attributeValue = reader.Value
End While
Hope this is what you were looking for.
rmakerson3 (AT) gmail (DOT) com wrote:
Quote:
When I am reading in a section of XML code for example:
cl
cp Name="Bob" Version="1.02" LastUpdate="01/02/2006"
/cl
Is it possible to read (name, version, lastupdate) dynamically so that
if they change to (userName, userVersion, updated) that I will still be
able to gracefully handle parsing this code.
Thanks,
Rich |