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

  • SEARCH
  • Home
  • 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 7719877
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:31:29+00:00 2026-06-01T03:31:29+00:00

My question is, does the XPathSelectElement method support a where clause in the xpath

  • 0

My question is, does the XPathSelectElement method support a where clause in the xpath query?

Here is an example of what I am trying to do:

var element = coreXml.XPathSelectElement(configuration/system.serviceModel/client/endpoint[@name='SomeService']);

When I run this I am returned ‘null’ based on the follow xml:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <system.serviceModel>
        <client>
            <endpoint address="http://localhost:40901/SomeService/" binding="basicHttpBinding" contract="SomeContract" name="SomeService"/>
        </client>
    </system.serviceModel>
</configuration>

Regards.

  • 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-06-01T03:31:30+00:00Added an answer on June 1, 2026 at 3:31 am

    I can’t reproduce the problem, I saved your XML samples as “XMLFile2.xml” in a C# console project, then corrected your code sample to wrap the XPath expression passed to XPathSelectElement in double quotes and made the following code sample:

        XDocument coreXml = XDocument.Load("../../XMLFile2.xml");
        var element = coreXml.XPathSelectElement("configuration/system.serviceModel/client/endpoint[@name='SomeService']");
        Console.WriteLine(element == null);
    

    It outputs “False”.

    So something in your real code is different.

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

Sidebar

Related Questions

A quick question: Does IE 6,7 support the css of background-color:inherit; ? for example
Question: Does anyone have an example of a filter as you type dropdown control
Drupal Question: Does anyone have a method of using Views and highlighting a selected/current
really quick question does php 5 still support include_once because I am getting some
Simple question: does SQLite support FULL-TEXT searches? If not, is there any way I
Here's my question: Does calling free or delete ever release memory back to the
this is a simple question: does Silverlight (3.0?) support this kind of encoding? Encoding
Short question :) Does anyone have a method for creating a Inner glow effect
For example, http://www.quora.com/Is-getting-ripped-worth-it As you can see, the URL for a question does not
Question: Does NFop support floats? Background: I have the requirement to generate a printable

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.