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

  • Home
  • SEARCH
  • 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 949349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:23:23+00:00 2026-05-15T23:23:23+00:00

I am writing an output module to visualize my data on another program. If

  • 0

I am writing an output module to visualize my data on another program.

If you inspect the code, i add point coordinates to a string and then add this string as a TextNode to another element. Problem is number of points can be more than 500000

Is there a better way to write a lot of text to xml or is this OK?

XMLElement points = doc.CreateElement("VTK", "DataArray");

string str = "";

for (int i = 0; i < sim.NumberOfParticles; i++)
{
str += sim.pPosX[i].ToString() + " " + sim.pPosY[i] + " " + sim.pPosZ[i] + "\n"
}
XmlText coordinates = doc.CreateTextNode(str);
points.AppendChild(coordinates);
  • 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-15T23:23:24+00:00Added an answer on May 15, 2026 at 11:23 pm

    For this amount of data, use the XmlWriter instead of a XmlDocument. It streams and resources are no problem any more.

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

Sidebar

Related Questions

I am writing a program that processes the output of another program. Assume my
This tail -n 1217060 input.sql > /disk2/mysql_dump/output.sql is not writing to the output file.
Often when writing PHP I'll have it output some HTML like this - echo
I'm writing a script to output Google Analytics API data and insert it into
Right now I am writing a simulation program which output is formatted according to
I am having a problem writing a string like a word Zürich the output
I'm having problems with this getopt() code in a script that I'm writing which
Which code is better in writing a RAM? assigning data_out inside always block: module
I am writing a Blog module, and sanitize the blog_post at INPUT with $this->form_validation->set_rules('blog_data',
I'm writing a module to add functionality to the FlagShihTzu gem. Basically it goes

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.