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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:29:19+00:00 2026-06-16T10:29:19+00:00

I would like to parse this XML : <?xml version=1.0 encoding=Windows-1252 ?> <TEST>Login inexistant</TEST>

  • 0

I would like to parse this XML :

<?xml version="1.0" encoding="Windows-1252" ?>
<TEST>Login inexistant</TEST>

I wrote this code

var result  = from item in XElement.Parse(m_strRetour).Descendants("TEST")
              select item;
return result.First().ToString();

m_strRetour is a string that contains my XML.

After execution, result is empty.

What am I doing wrong?

  • 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-16T10:29:20+00:00Added an answer on June 16, 2026 at 10:29 am

    TEST seems to be your root node, so it can’t be a Descendant.

    To get the value out of it you could try this.

    var xml = "<?xml version='1.0' encoding='Windows-1252' ?><TEST>Login inexistant</TEST>";
    
    var result  = XElement.Parse(xml);
    var value = result.Value;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to parse this xml file: <?xml version=1.0 encoding=utf-8?> <resources> <string-array name=descripciones>
I've got XML that looks like: <?xml version=1.0 encoding=Windows-1250 ?> <offers> <offer> <offer_num>20790</offer_num> <pics>
I've got the following below XML and would like to parse this with JQuery
I have an XML file that looks like this: <?xml version=1.0? encoding=UTF-8 standalone=no?> <dir
This is my XML: <?xml version=1.0 encoding=UTF-8?> <Tests> <Test case=1> <str>200000</str> </Test> <Test case=2>
I am getting json response like this {item_id:1,item_title:Item 1}{item_id:2,item_title:Item 2} how would I parse
I'm new to jQuery and would like to parse an XML document. I'm able
I am trying to parse the following XML: <?xml version=1.0 encoding=UTF-8?> <!-- _tag -->
I have an XML document in this format: <?xml version=1.0 encoding=utf-8 ?> <SupportedServices> <Service>
I have the following XML document which I would like to parse into a

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.