Groups | Blog | Home
all groups > dotnet xml > may 2004 >

dotnet xml : Reading an XML value


Michael McD
5/4/2004 4:01:06 AM
What's the fastest way to read an elements value from a string containing XML

The readers require streams and creating a DOM brings a lot of overhead!

Ta in advance
Oleg Tkachenko [MVP]
5/4/2004 2:38:01 PM
[quoted text, click to view]

Use XmlTextReader over StringReader:

XmlReader r = new XmlTextReader(new StringReader(xmlStr));

That's the most effective way.
--
Oleg Tkachenko [XML MVP]
AddThis Social Bookmark Button