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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:06:41+00:00 2026-06-05T22:06:41+00:00

I have an getting an xml response on this format <?xml version=\1.0\ encoding=\utf-8\?>\r\n <PlatformResponse

  • 0

I have an getting an xml response on this format

  <?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n
       <PlatformResponse xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"     xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://platform.intuit.com/api/v1\">\r\n  
<ErrorMessage>OAuth Token rejected</ErrorMessage>\r\n  
<ErrorCode>270</ErrorCode>\r\n  
<ServerTime>2012-06-19T00:01:31.5150146Z</ServerTime>\r\n
</PlatformResponse>

I need to grab the value in the <ErrorCode> node, for that I did the following but it is not getting any values..

            XmlDocument xml = new XmlDocument();
            xml.LoadXml(xmlResponse);

            XmlNodeList xnList = xml.SelectNodes("PlatformResponse");
            foreach (XmlNode xn in xnList)
            {
                result.Message = xn["ErrorCode"].InnerText;
            }

Any help would be much appreciated.

  • 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-05T22:06:42+00:00Added an answer on June 5, 2026 at 10:06 pm

    There seems to be some dirt in your PlatformResponse node that’s giving problems, ( xmlns:xsd= etc… )

    Using this xml

    String sXml = @"<?xml version='1.0' encoding='utf-8'?>
       <PlatformResponse >
            <ErrorMessage>OAuth Token rejected</ErrorMessage>
            <ErrorCode>270</ErrorCode>
            <ServerTime>2012-06-19T00:01:31.5150146Z</ServerTime>
        </PlatformResponse>";
    

    And select like

    XmlNodeList xnList = xml.SelectNodes("/PlatformResponse");
    

    Your code works fine.

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

Sidebar

Related Questions

I have the following Xml in my Resources.xmltest: <?xml version=1.0 encoding=utf-8 ?> <Response xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
I have the following XML: <ns:response xmlns:ns=http://example.com xmlns:ax=http://example.com/xsd > <ns:return type=mytype> <ax:roleID>1</ax:roleID> <ax:roleName>ADM</ax:roleName> </ns:return>
I have write xml code for requesting web service I am getting proper response
I'm having an issue getting a LINQ query to work. I have this XML:
Getting this weird LINQ error. title = System.Linq.Enumerable+WhereSelectEnumerableIterator`2[System.Xml.Linq.XElement,System.String Here is the code I have:
i have another question on getting my XML serialization neat, which i can't seem
i have used libxml2.Here when i am getting an XML data as a string
I have been getting this error: 'unresolved external symbol main referenced in function _
I have problem getting newer version of jscrollpane to work with jQuery UI tabs.
I am getting a web service response as below. It has additional XML tag

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.