Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 19th, 2006, 05:15 AM
Steve
Guest
 
Posts: n/a
Default How to select a boolean from a XpathNavigator

Hi. I have ax xpath expression which returns a true or false. I don't know
which method to use from the XPathNavigator object to get the result.
There's not a ".SelectValue("xpath expression") method. Typically, I may use
..Select or .SelectSingleNode but I'm not returning a node or set of nodes?
Maybe I shouldn't be using a XPathNavigator? Please let me know if you have
any ideas.
Thanks!
--
Steve
  #2  
Old February 19th, 2006, 05:45 AM
Cerebrus99
Guest
 
Posts: n/a
Default Re: How to select a boolean from a XpathNavigator

Hi Steve,

Use the XpathNavigator.Evaluate("XpathExpression") method. It will return an
Object variable, that you can convert to Boolean using CType.

HTH,

Regards,

Cerebrus.

"Steve" <smsinger3@newsgroup.nospam> wrote in message
news:208C58ED-17DA-4F3B-AB10-F7B0FC57CF76@microsoft.com...[color=blue]
> Hi. I have ax xpath expression which returns a true or false. I don't[/color]
know[color=blue]
> which method to use from the XPathNavigator object to get the result.
> There's not a ".SelectValue("xpath expression") method. Typically, I may[/color]
use[color=blue]
> .Select or .SelectSingleNode but I'm not returning a node or set of nodes?
> Maybe I shouldn't be using a XPathNavigator? Please let me know if you[/color]
have[color=blue]
> any ideas.
> Thanks!
> --
> Steve[/color]


  #3  
Old February 19th, 2006, 01:15 PM
Martin Honnen
Guest
 
Posts: n/a
Default Re: How to select a boolean from a XpathNavigator



Steve wrote:
[color=blue]
> I have ax xpath expression which returns a true or false. I don't know
> which method to use from the XPathNavigator object to get the result.[/color]

Use the method Evaluate, its return type is the generic object, you can
then cast to the type you expect e.g. a bool in C#.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles