Click to See Complete Forum and Search --> : Interpretting XML entities


Toot
March 22nd, 2005, 06:17 AM
Hi all,

I'm using XmlValidatingReader to parse some incoming data. That incoming data regularly contains character entities, e.g. "length rule is: 0 < length <= 12"

I'm using XmlValidatingReader's ReadInnerXml method to retrieve the xml but currently it's returning exactly what's in the element. I'd like it to return (in the above example) "length rule is: 0 < length <= 12".

I've tried playing with XmlValidatingReader's EntityHandling property but that doesn't appear to make any difference.

Clearly I could write my own function but somehow that seems a little like re-inventing the wheel ... can anyone point me in the right direction for a routine that already does this?

Thanks for your time,
T

Krzemo
March 22nd, 2005, 07:03 AM
Just guessing ...
Maybe ReadString (or ReadTypedValue) instead of ReadInnerXML will help.

Best regards,
Krzemo.

Toot
March 22nd, 2005, 07:52 AM
:thumb: :thumb: :thumb:

Excellent - ReadString did the job. Apologies for my extreme stupidity :blush:

T