Know thy framework System.xml.XmlConvert

The .NET framework is a really large framework. While having the strength of being quite extensive and robust there are many dark corners of it that many of us almost never touch or even get to know. Now and then I like to explore and shine a light in one of those dark corners.
Introducing XmlConvert. I had the pleasure of finding this dark corner when I was parsing a duration element, the value was one that I hadn’t seen before PT0S but I knew this, this is not a time or timespan that DateTime.Parse() or TimeSpan.Parse() could use. 
The XmlConvert class has methods for converting string values that follow the W3C’s XML Scheme part 2 to it’s .NET equivalent type.

So there it is, check it out and the next time you encounter a weird value in a xml file and need to parse it then you know where to go.

Technorati-taggar: ,,

Print | posted on Friday, March 27, 2009 5:55 PM

Comments

Gravatar

# re: Know thy framework System.xml.XmlConvert, Posted by snow boots for women on 10/15/2010 11:09 AM

So there it is, check it out and the next time you encounter a weird value in a xml file and need to parse it then you know where to go.

Comments

Title: *
Name: *
Email: (never displayed)
Website:
Comment: *  
Please add 8 and 4 and type the answer here: