Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Aug 13 '11 at 15:38

This question came from our site for professional and enthusiast programmers.

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

1 Answer 1

up vote 7 down vote accepted

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|improve this answer
    
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 '11 at 11:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.