Re: How to check if a string is an XML before calling LoadXML(str)
- From: cloudx <cloudx@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 17 May 2005 15:39:24 -0700
I am new to C# so I might be asking some silly questions. The issue is that
if the str is not XML then I would like to do something else instead of being
kicked out by exception. Thanks!
"Jon Skeet [C# MVP]" wrote:
> cloudx <cloudx@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> > hi there, in VB LoadXML(str) returns true or false so that you can do
> > different coding when the str is XML or not, but in C# LoadXML doesn't have
> > return but only throw exception if str is not XML document. How would I do if
> > I want to do my own code if str is not an XML? thanks!
>
> Anything wrong with catching the exception? It seems the simplest way
> to me.
>
> --
> Jon Skeet - <skeet@xxxxxxxxx>
> http://www.pobox.com/~skeet
> If replying to the group, please do not mail me too
>
.
- Follow-Ups:
- References:
- How to check if a string is an XML before calling LoadXML(str)?
- From: cloudx
- Re: How to check if a string is an XML before calling LoadXML(str)?
- From: Jon Skeet [C# MVP]
- How to check if a string is an XML before calling LoadXML(str)?
- Prev by Date: Re: Showing and Hiding Forms
- Next by Date: Re: How to check if a string is an XML before calling LoadXML(str)
- Previous by thread: Re: How to check if a string is an XML before calling LoadXML(str)?
- Next by thread: Re: How to check if a string is an XML before calling LoadXML(str)
- Index(es):
Relevant Pages
|