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 8964767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:39:47+00:00 2026-06-15T16:39:47+00:00

The XML (fragment): <?xml version=1.0 encoding=utf-8?> <soap:Envelope xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/ xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns:xsd=http://www.w3.org/2001/XMLSchema> <soap:Body> <GetXMLResponse xmlns=http://sitecore.net/visual/> <GetXMLResult>

  • 0

The XML (fragment):

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<GetXMLResponse xmlns="http://sitecore.net/visual/">
<GetXMLResult>
<sitecore xmlns="">
<status>ok</status>

The code (fragment):

XmlNamespaceManager nsManager = new XmlNamespaceManager(template.NameTable);
nsManager.AddNamespace("soap", "http://schemas.xmlsoap.org/soap/envelope/");
nsManager.PushScope();

XmlNode sitecoreRoot = template.SelectSingleNode("/soap:Envelope/soap:Body/*[namespace-uri()='http://sitecore.net/visual/' and local-name()='GetXMLResponse']", nsManager);

string status = sitecoreRoot.SelectSingleNode("/GetXMLResult/sitecore/status").Value;

sitecoreRoot element returns the correct node. However the XPath to get the status always returns null, even though the siteCoreRoot.OuterXMl property shows the element is present.

The only thing I can think of is the line:

<sitecore xmlns="">

is throwing off the XPath

TIA

  • 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-15T16:39:48+00:00Added an answer on June 15, 2026 at 4:39 pm
    XmlNamespaceManager ns = new XmlNamespaceManager(cd.NameTable);
            ns.AddNamespace("sp", "http://schemas.xmlsoap.org/soap/envelope/");
            ns.AddNamespace("sc", "http://sitecore.net/visual/");
            XmlNode sitecoreRoot = cd.SelectSingleNode("//sp:Envelope/sp:Body/sc:GetXMLResponse/sc:GetXMLResult/sitecore/status", ns);
    var status = sitecoreRoot.InnerText;
    

    May help you?

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

Sidebar

Related Questions

I've xml as below, <?xml version=1.0 encoding=utf-16 ?> <AllResidentAndUnitInfo xmlns:i=http://www.w3.org/2001/XMLSchema-instance i:type=ResidentsByUnitInfo xmlns=http://schemas.datacontract.org/2004/07/FSRSchema> <BillingAddresses> <BillingAddress>
I have this XML document : <?xml version=1.0 encoding=utf-8?> <Wix xmlns=http://schemas.microsoft.com/wix/2006/wi> <Fragment> <DirectoryRef Id=AcquisitionFolder>
Here is my XML fragment: <?xml version=1.0 encoding=UTF-8?> <ns:searchResult xmlns:ns=http://outerx.org/daisy/1.0> ... <ns:rows> <ns:row documentId=1440-DFO_MPO
Given the following XML file: <?xml version=1.0 encoding=utf-8?> <Wix xmlns=http://schemas.microsoft.com/wix/2006/wi> <Fragment> <DirectoryRef Id=INSTALLLOCATIONAGENT> <Component
I have such layout: frame_layout.xml <?xml version=1.0 encoding=utf-8?> <FrameLayout xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/items android:layout_width=match_parent android:layout_height=match_parent> </FrameLayout>
I have a quite simple layout: <?xml version=1.0 encoding=utf-8?> <!-- --> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/dialog_progress
Here's my my_lifts_list.xml: <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=wrap_content android:layout_height=wrap_content android:orientation=vertical android:background=@drawable/white_linen> <LinearLayout android:id=@+id/bottom_control_bar
<?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical > <com.handmark.pulltorefresh.library.PullToRefreshScrollView xmlns:ptr=http://schemas.android.com/apk/res-auto android:id=@+id/pull_refresh_scrollview android:layout_width=fill_parent android:layout_height=fill_parent
xml: <workers xmlns=http://www.zoo.com xmlns:xs=http://www.w3.org/2001/XMLSchema-instance xs:schemaLocation=http://www.zoo.com worker.xsd> <impiegato> <username>mario</username> <password>de2f15d014d40b93578d255e6221fd60</password> <nome>Mario</nome> <sesso>F</sesso> <eta>23</eta> </impiegato> <impiegato>
I have a faux dialog which uses this layout: <?xml version=1.0 encoding=utf-8?> <FrameLayout xmlns:android=http://schemas.android.com/apk/res/android

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.