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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T11:42:54+00:00 2026-06-03T11:42:54+00:00

here is my xml file <TEST> <Project_Name>browser</Project_Name> <Setting BrowserKind =Firefox ></Setting> <ExecuteUrl>http://yahoo.com</ExecuteUrl> <caseBox> <test1>apple</test1>

  • 0

here is my xml file

<TEST>
  <Project_Name>browser</Project_Name>  

      <Setting BrowserKind ="Firefox" ></Setting>   

      <ExecuteUrl>http://yahoo.com</ExecuteUrl>

  <caseBox>      
     <test1>apple</test1>
  </caseBox>
</TEST>

this xml means nothing,it’s an example. I just want to make some practice.

here are 3 thing i want to get:

(1)Firefox

(2)http://yahoo.com

(3)apple

I use xmldocument, but failed ,nothing I totally get.

how can I get them???

thanks.

this is my test to get firefox

here is my code:

       XmlDocument XmlDoc = new XmlDocument( );
       XmlDoc.Load(here I PLACE THE LOCATION OF FILE);
       XmlNodeList NodeLists = XmlDoc.SelectNodes("TEST/Setting");


        foreach (XmlNode OneNode in NodeLists)
        {

            String StrAttrValue1 = OneNode.Attributes[" Browserkind "].Value;
            String StrAttrValue2 = OneNode.InnerText;
        }
  • 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-03T11:42:56+00:00Added an answer on June 3, 2026 at 11:42 am

    If switching to LINQ to XML is an option, rather than the older Xml API, I’d do it.

    var doc = XDocument.Parse(@"<TEST>
      <Project_Name>browser</Project_Name>  
    
          <Setting BrowserKind =""Firefox"" ></Setting>   
    
          <ExecuteUrl>http://yahoo.com</ExecuteUrl>
    
      <caseBox>      
         <test1>apple</test1>
      </caseBox>
    </TEST>");
    
    
    var result = (from test in doc.Elements("TEST")
                  select new { BrowserKind = test.Element("Setting").Attribute("BrowserKind").Value,
                               ExecuteUrl = test.Element("ExecuteUrl").Value,
                               CaseBox = test.Element("caseBox").Element("test1").Value });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

here is the XML file : <com.google.android.maps.MapView android:layout_width=fill_parent android:layout_height=fill_parent android:apiKey=0q7NUYm4bgzeXlqXtKYVPJDRWUJmt8Cu0gvbWMx android:id=@+id/map_view /> and Manifest
my web application has an xml file here: /files/xml/test.xml I need to load a
I'm trying to run Junit test from my ant build.xml file. I read here
Here is part 1 of our problem (Loading a dynamically generated XML file as
Here is my first attempt at validating XML with XSD. The XML file to
I have an XML file that is very long, but here is a shot
I am writing a XML file into a HTML file using JavaScript. Here is
I get this error in xml file very often. here is the code in
Here is my ultimate goal... to take this xml file.. <?xml version=1.0?> <Songs> <Song>
Here's what I am trying to achieve. I am importing an xml file of

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.