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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:35:42+00:00 2026-05-31T11:35:42+00:00

Here is the sample XML that I am receiving from the web service. <xml

  • 0

Here is the sample XML that I am receiving from the web service.

<xml xmlns:s='uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882'
xmlns:dt='uuid:C2F41010-65B3-11d1-A29F-00AA00C14882'
xmlns:rs='urn:schemas-microsoft-com:rowset'
xmlns:z='#RowsetSchema'>
<s:Schema id='RowsetSchema'>
<s:ElementType name='row' content='eltOnly'>
    <s:AttributeType name='NAME' rs:number='1'>
        <s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='25'
         rs:maybenull='false'/>
    </s:AttributeType>
    <s:AttributeType name='DESCRIPTION' rs:number='2' rs:nullable='true'
         rs:writeunknown='true'>
        <s:datatype dt:type='string' rs:dbtype='str' dt:maxLength='80'/>
    </s:AttributeType>
    <s:extends type='rs:rowbase'/>
</s:ElementType>
</s:Schema>
<rs:data>
<z:row NAME='JOE BLOW' DESCRIPTION='PROGRAMMER'/>
<z:row NAME='ANN SMITH' DESCRIPTION='FRONT DESK'/>
<z:row NAME='STEVE JOHNSON' DESCRIPTION='TESTER'/>
</rs:data>
</xml>

I’m not sure how to go about getting to the <rs:data> node. I eventually want to enumerate through each <z:row> and get the attributes NAME and DESCRPTION. The webservice returns this to me as a string so I load the string into an XMLDocument like this:

XmlDocument xDoc = new XmlDocument();
xDoc.LoadXml(xmlString);

Now, I’m not sure if I need to use a XmlNamespaceManager in order to tel my xDoc to import the <s:Schema>

I’ve tried to select a single node with an XPath with no luck because of the prefix rs.

XmlNode xNode = xDoc.SelectSingleNode("/rs:data");

If there is any further information needed, please ask.

  • 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-31T11:35:43+00:00Added an answer on May 31, 2026 at 11:35 am

    If you are taking the xml as a string try parsing it like instead of using Load()

    var xml = XDocument.Parse(xmlstring);
    

    You have to use the namespace to get hold of the data properly.

    XNamespace ns = "#RowsetSchema";
    
    foreach (var element in xml.Descendants().Elements(ns + "row"))
    {
        Console.WriteLine ("Name = " + element.Attribute("NAME").Value + ", " + "Description = " + element.Attribute("DESCRIPTION").Value); 
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is my sample code: from xml.dom.minidom import * def make_xml(): doc = Document()
Here is a sample from Kernighan & Ritchie's The C Programming Language: int getline(char
Here is a sample code to retrieve data from a database using the yield
I found one sample application from the Blackberry knowledgebase. From that application I have
I have xml data that is retrieved from a server and I need to
I'm trying to consume data from a 3rd party web service. Unfortunately, the web
Consider this simple XML document. The serialized XML shown here is the result of
Here is a simple form I am using to send XML data in admin_xml.php
I am trying to reuse Apple's Speak Here sample code in my own iPhone
Here is the sample: Dim TestString As String = Hello, & Chr(0) & World

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.