Article View: borland.public.delphi.xml
Article #115TXMLDocument is a memory hog, need alternatives
From: Brian Thomas
Date: Sun, 27 Jan 2008 01:52
Date: Sun, 27 Jan 2008 01:52
20 lines
1943 bytes
1943 bytes
I am using Delphi 7.0. In the past I have written a generic import/export routine using TXMLDocument and it has worked wonderfully but with my last export to a file (my data is quite large) I found two problems: 1) TXMLDocument is extremely slow, and 2) it is all memory bound. So much so that my app ran up to 1.6 Gig of memory and ran out of memory and died. Thus, I need an alternative. Someone at our company wrote a similar routine using the FileStream classes and it is fast enough but he's manually concatenating '<' and '>' to our elements. I would like something fast but want something more structured so the code will handle the elements/attributes like TXMLDocument does. Besides that, I would like to be able to read the xml document without having to search for '<' and '>' characters. Any ideas? I'm finding many things on SAX/DOM but many of them haven't been updated since 2003 or so. I'm excited to move to .Net where I can use XMLWriter but that's not an option right now. Thanks in advance.
Technical Details
Message-ID:
<479be3ab$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f5d9b,e6842eb086a05e36,start X-Google-Attributes: gidf5d9b,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Date: Sat, 26 Jan 2008 19:52:45 -0600 From: Brian Thomas <brian.thomas@doorgroup.com> User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 Newsgroups: borland.public.delphi.xml Subject: TXMLDocument is a memory hog, need alternatives Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 71.38.171.89 Message-ID: <479be3ab$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1201398699 71.38.171.89 (26 Jan 2008 17:51:39 -0700) Lines: 20 Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail