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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:52:50+00:00 2026-05-31T23:52:50+00:00

I use the following code to copy the content of an XML file into

  • 0

I use the following code to copy the content of an XML file into a richTextox

XmlDocument xdoc = new XmlDocument();
xdoc.Load(filename);
richTextBox1.Text = xdoc.InnerText;

but the result is a continuous string, for example

<node1>...</node1><node2>...</node2><node3>...</node3>

So how could I send each element to an new line?
In order to have the same result but vertically.
Is it possible to do it the way that I copy the content to the richTexbox?

  • 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-31T23:52:51+00:00Added an answer on May 31, 2026 at 11:52 pm

    Not sure if this is what you’re looking for. Been a while since I worked on C#

    XmlDocument xdoc = new XmlDocument();
    xdoc.Load(filename);
    XmlNode root = xdoc.DocumentElement;
    
        //Display the contents of the child nodes.
        if (root.HasChildNodes)
        {
          for (int i=0; i<root.ChildNodes.Count; i++)
          {
            richTextBox1.AppendText(root.ChildNodes[i].InnerText+"\n");
          }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use the following code to store user password into a mysql table with
I use following code: Create a retry policy, when error, retry after 1 second,
I use VS2010, C# to develop Silverlight 4 app, I use following code in
I have an array of objects, and i use following code to get in
I am using wxWidgets 2.9.2, when i use following code //ToolBar wxToolBar *mainTool =
I use the following code for retrieve the data from my Sql DB.retrieve StudName
I use the following code for retrieve the data from mysql Student data Base.It
I use the following code to create countdowns in Javascript. n is the number
I use the following code try to create an array of string vectors, I
I would like to copy the content of one std::map into another. Can I

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.