>>>>>I just posted the thread in SQL XML forum which explains what I am after:
>>>>>
>>>>>
http://social.msdn.microsoft.com/Forums/en-US/sqlxml/thread/06d3cdd7-2a5a-4fb4-83fd-d9cf9a66040a>>>>>
>>>>>What do you think?
>>>>
>>>>Hmm. If it's not valid XML then it won't load so .NET options won't work. Maybe you can hire Bill to shoot the person responsible for producing the XML'ish' string in the first place :-}
>>>
>>>In 90% of cases it will be OK XML (do you think the two samples I posted represent valid XML)? I think I can go with the assumption it's valid and use XML libraries with try/catch.
>>
>>What are you going to do with the 10% that throw an exception :-}
>
>Just forget about them :) At least for now.
>
>I want to write that method as String extension,
> BTW. Do you think it's a good idea or better keep it as a separate method in the base class?
Wouldn't have thought it a good candidate for an string extension method - to my mind any string extension method should work for any string otherwise it can be confusing to the user.....