On Mon, 2007-12-10 at 13:14 +0000, Beginner wrote: > Hi, > > I have a huge XML file, 1.7GB, 53080215 lines. I am trying to extract > an attribute from each record (code=). I several problems one of > which is the size of the file is making it painful to test my scripts > and methods for parsing. > > I would like to extract a few hundred records (by any means) so I can > experiment. I think XPath is the way to go here. The file > (currently) sits on a *nix system but I was going to do the parsing > to on a Win32 workstation rather than steal all the memory on a > server. If your data file is on a *nix system, use head -200 filename > sample_filename to take the first 200 records.
HTH, Tim Bowden -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/