XML Parsing in CF 2.0

  • Thread starter Thread starter rmakerson3
  • Start date Start date
R

rmakerson3

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
 
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.
 
Back
Top