2

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.

5
  • gedit? so you are not asking how to do that programmatically?
    – Gordon
    Aug 13, 2011 at 11:42
  • @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.
    – itsols
    Aug 13, 2011 at 11:45
  • @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"
    – Matt
    Aug 13, 2011 at 11:45
  • 1
    @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.
    – Gordon
    Aug 13, 2011 at 11:47
  • 1
    @Gordon no worries, I already flagged it as such
    – Matt
    Aug 13, 2011 at 11:48

1 Answer 1

7

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)

1
  • 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!
    – itsols
    Aug 13, 2011 at 11:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .