From: Lloyd Linklater Date: 2007-07-23T21:51:16+09:00 Subject: Re: Processing a huge xml file Tim Perrett wrote: > I was wondering what advice anyone could possibly hand me about > processing a huge XML (in fact its an XSD file) > > Overall, its about 20,000 lines of XML to load. Even on my macbook pro > with 2GB of RAM, libxml-ruby eats it up extremely quickly (and about 2.8 > GB of virtual memory). This is obviously unacceptable, but I am not sure > that a work around exists? > > I wanted to load in the schema in order to validate the messages and xml > I was generating. Has anyone any ideas on a potential work around? Run it in windows? :) But seriously, 20k lines of XML should not take that much memory unless the lines are HUGE. How about a simplistic approach? I know that this is not intensively RUBY but it may help. What if you were to launch it in a browser? They display XML files in formatted fashion which means that they must parse them. You could then parse through the resulting page and see if there is an error message therein. Just a text search for "XML Parsing Error" and that should tell you if it worked. -- Posted via http://www.ruby-forum.com/.