Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7279111
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:58:52+00:00 2026-05-28T22:58:52+00:00

The definition of the XPathResultType enumeration in the .NET framework gives the same value

  • 0

The definition of the XPathResultType enumeration in the .NET framework gives the same value (1) to “String” as it does to “Navigator”. Surely that can’t be right? What gives?

I’m implementing some custom XPath function, and I’m trying to write a single method to validate the arguments of my functions based on the declared XPathResultType of each argument. However, I’m stumped as to how I’m supposed to cater for this overlap…


#region Assembly System.Xml.dll, v4.0.30319
// C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\Profile\Client\System.Xml.dll
#endregion

using System;

namespace System.Xml.XPath
{
    // Summary:
    //     Specifies the return type of the XPath expression.
    public enum XPathResultType
    {
        // Summary:
        //     A numeric value.
        Number = 0,
        //
        // Summary:
        //     A System.String value.
        String = 1,
        //
        // Summary:
        //     A tree fragment.
        Navigator = 1,
        //
        // Summary:
        //     A System.Booleantrue or false value.
        Boolean = 2,
        //
        // Summary:
        //     A node collection.
        NodeSet = 3,
        //
        // Summary:
        //     Any of the XPath node types.
        Any = 5,
        //
        // Summary:
        //     The expression does not evaluate to the correct XPath type.
        Error = 6,
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T22:58:53+00:00Added an answer on May 28, 2026 at 10:58 pm

    There is a closed issue on Microsoft Connect: https://connect.microsoft.com/VisualStudio/feedback/details/97578/both-xpathresulttype-string-and-xpathresulttype-navigator-are-1

    Answer from Microsoft:

    The overlapping enum values is a known issue. The workaround is to
    never use the XPathResultType.Navigator value and to always use
    XPathResultType.NodeSet.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does definition list <dl> require that each <dd> will have <dt> tag? Example: option1
Is there a definition of framework that could be used to distinguish a framework
By Definition we know that Boxing – Converts value-type TO reference type. Stored on
Definition of variables in use: Guid fldProId = (Guid)ffdPro.GetProperty(FieldId); string fldProValue = (string)ffdPro.GetProperty(FieldValue); FormFieldDef
;; definition of the structure book ;; author: string - the author of the
My definition XML is: <CheckedTextView android:textSize=18.0dip android:text=@string/text android:textColor=@color/white android:id=@+id/test android:layout_width=fill_parent android:layout_height=wrap_content android:checkMark=?android:attr/textCheckMark /> Everything
Definition of my Class Public Class ProcessAlert Public LoanNumber As String Public EmailAddress As
typically definition of property/column looks like this: <property name=DocumentSummary column=DocumentSummary length=100 type=String> <column name=DocumentSummary
By definition (at least from what I've seen) sargable means that a query is
By definition the JSON string is wrapped with double quote. In fact: json.loads('{v:1}') #works

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.