How can I open a large XML file?

5,453

Vim will be able to handle 20mb without breaking a sweat. It should be more than enough to do your record deletions. Run vimtutor if you need a good walkthrough on how to use it (lesson 2.1 covers the deletion commands)

Share:
5,453

Related videos on Youtube

itsols
Author by

itsols

Founder CEO of Marha Online (Pvt) Ltd - a solutions and training organisation. As a teacher, I mostly enjoy teaching the 9th to 12th grades. As a developer, I love taking on challenging solutions like mlti-site DB applications, client-server apps and web apps.

Updated on September 18, 2022

Comments

  • itsols
    itsols over 1 year

    I have to read an XML file and put it into a database. First, though, I want to open it and 'clean' it by deleting many chunks of records. The original file is about 20Mb.

    How can I open this file to see its contents and remove records?

    I have tried both gedit and Firefox, but both programs seem to go into a freeze situation after even 5 minutes.

    My OS is Ubuntu 10.10 and I hope to do the final code using PHP.

    • Admin
      Admin almost 13 years
      gedit? so you are not asking how to do that programmatically?
    • itsols
      itsols almost 13 years
      @Gordon, I know how to read it using PHP. But I want to know how the contents can be viewed so that I can remove some records manually. After that, I'll go for the coding. This is why I'm trying to use GEdit - at least that's the only text editor I am comfortable with.
    • Matt
      Matt almost 13 years
      @Gordon he's asking for a good tool for cleaning up the data manually: "But before that I want to open it and 'clean' it by deleting many chunks of records"
    • Admin
      Admin almost 13 years
      @Matt If the question is how to open it with an editor, the question is not suitable for StackOverflow because it is not programming related. It should be moved to Superuser then.
    • Matt
      Matt almost 13 years
      @Gordon no worries, I already flagged it as such
  • itsols
    itsols almost 13 years
    Thanks Matt. That's amazing! I'm surprised to find my Gedit going into a deadlock but VIM just opened it in a few seconds! Thanks again!