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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T22:14:02+00:00 2026-05-28T22:14:02+00:00

I im going to read file by xmlReader and insert a child elements into

  • 0

I im going to read file by xmlReader and insert a child elements into this object by XmlWriter and save the output. How i can parse data between this two classes? I know that SimpleXml is already exists and makes it easy. but i have a huge amount of the data and i need to make it faster then SimpleXml can. It is only teory and i havnt code yet, i need only to get answer only by these qwestions:
Is creating two objects reader/writer and their work Is faster then similar via SimpleXml ?
How does it possible to use xmlReader object and parse data parts into XmlWriter?

  • 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-28T22:14:03+00:00Added an answer on May 28, 2026 at 10:14 pm

    XMLWriter is not only faster than SimpleXML, but also takes less memory. Especially when you need to handle large amounts of data (as you do), you should use XMLWriter as with larger data speed really starts to matter.

    Of course, you can have a XMLReader and a XMLWriter at the same time. And you would do it just as you wrote: read from the XMLReader and write it immediately to the XMLWriter.

    edit: I found some nice statistics (and also a code sample) here. Reading that, I also learned that SimpleXML takes less memory than the XMLWriter, which surprises me a little…so my initial statement seems to be only 50% true. Faster: yes, less memory: no.

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

Sidebar

Related Questions

How can I read a file and convert each line into a date? Ok
I know I can read a file line-by-line with this function , and then
i am going to read a TDMS file in matlab using Mexfunction in C
I have got this read file code from microsoft @C:\Users\computing\Documents\mikec\assignment2\task_2.txt That works fine when
My input file is going to be something like this key value key value
I need to write a function that can read a file, and add all
So I'm trying to read this file. Everything looks like it should work, but
I have a small text file that I'd like to read into a scalar
So I have this method that should read a file and detect if the
I get the strangest thing going on... I have a JSP file which read

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.