Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Xerces parser XML and Visual C++ 6.0

Reply
Thread Tools

Xerces parser XML and Visual C++ 6.0

 
 
Sylwester Bała
Guest
Posts: n/a
 
      07-22-2003
Hi, I have problem with Xerces can someone help me?



I have implementation Xerces in Visual C++ 6.0. Xerces is only an interface
of my application. Everything seems to be working well when I read small XML
files for example: 1, 2 or 3 size of MB. But the problem appears when I want
to read file with size of 36 MB. Application is loading this file for 13
hours ((((

It is very slow comparing it with other smaller files. Below I put my
statistics of reading files with different sizes:

________________________________

size: 1 MB average time: 38 second

size: 9 MB average time: 44 minutes

size: 36 MB average time: 13 hours



I would like to ask, whether has someone the same problem with Xerces like
me? I would like to hear some opinions about Xerces too.



Thanks for any help and suggestions.



Best regards

Sylvek


 
Reply With Quote
 
 
 
 
Andy Fish
Guest
Posts: n/a
 
      07-23-2003
I have never tried this sort of file size but I can't say I'm surprised at
the results

DOM is intended for processing relatively small fragments of XML at a time,
as it builds a complicated structure representing the XML in memory. If you
have large amounts of XML to handle you should probably restructure your
application. It really depends what you are trying to do but here are a
couple of ideas:

Try using sax to read the XML. This is more complicated to process but will
at least give you fast (and linear) performance. If you need to manipulate
just a bit of the tree you can convert just that part to DOM, do your stuff,
then re-serialise it out later.

Alternatively you could consider an XML database. this will allow you to do
an xpath query to retrieve some subtree, then manipulate it and commit your
changes back.

Andy


"Sylwester Bała" <(E-Mail Removed)> wrote in message
news:bfj8bc$5o4$(E-Mail Removed)...
> Hi, I have problem with Xerces can someone help me?
>
>
>
> I have implementation Xerces in Visual C++ 6.0. Xerces is only an

interface
> of my application. Everything seems to be working well when I read small

XML
> files for example: 1, 2 or 3 size of MB. But the problem appears when I

want
> to read file with size of 36 MB. Application is loading this file for 13
> hours ((((
>
> It is very slow comparing it with other smaller files. Below I put my
> statistics of reading files with different sizes:
>
> ________________________________
>
> size: 1 MB average time: 38 second
>
> size: 9 MB average time: 44 minutes
>
> size: 36 MB average time: 13 hours
>
>
>
> I would like to ask, whether has someone the same problem with Xerces like
> me? I would like to hear some opinions about Xerces too.
>
>
>
> Thanks for any help and suggestions.
>
>
>
> Best regards
>
> Sylvek
>
>



 
Reply With Quote
 
 
 
 
Sylwester Bała
Guest
Posts: n/a
 
      07-23-2003
Hi Andy,

thanks for the answer.

> Try using sax to read the XML. This is more complicated to process but

will
> at least give you fast (and linear) performance. If you need to manipulate
> just a bit of the tree you can convert just that part to DOM, do your

stuff,
> then re-serialise it out later.


SAX was implemented before in this application but for some reason it was
changed on DOM. ( Don't ask me: why? )
Before this application was using the SAX, but then appeared the request to
change this structure of application to DOM.
I reckon it wasn't good idea (((

>
> Alternatively you could consider an XML database. this will allow you to

do
> an xpath query to retrieve some subtree, then manipulate it and commit

your
> changes back.


I will read about it because I didn't use it before. Can you let me know
where I could find some information about this.


> > Hi, I have problem with Xerces can someone help me?
> >
> >
> >
> > I have implementation Xerces in Visual C++ 6.0. Xerces is only an

> interface
> > of my application. Everything seems to be working well when I read small

> XML
> > files for example: 1, 2 or 3 size of MB. But the problem appears when I

> want
> > to read file with size of 36 MB. Application is loading this file for 13
> > hours ((((
> >
> > It is very slow comparing it with other smaller files. Below I put my
> > statistics of reading files with different sizes:
> >
> > ________________________________
> >
> > size: 1 MB average time: 38 second
> >
> > size: 9 MB average time: 44 minutes
> >
> > size: 36 MB average time: 13 hours
> >
> >
> >
> > I would like to ask, whether has someone the same problem with Xerces

like
> > me? I would like to hear some opinions about Xerces too.
> >
> >
> >
> > Thanks for any help and suggestions.
> >
> >
> >
> > Best regards
> >
> > Sylvek
> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
XML::Parser Installation error: XML-Parser-2.34 Sean Perl Misc 3 10-03-2006 01:23 AM
XML::Parser Installation error: XML-Parser-2.34 Sean Perl Misc 0 10-02-2006 06:20 PM
XML-Parser to XML-Parser communication (encoding issues?) arne Perl Misc 0 09-13-2005 12:53 PM
Upgrade of Xalan 1.2.2 and Xerces 1.4.4 to Xalan 2.6 and Xerces 2.6.2 cvissy XML 0 11-16-2004 07:06 AM
Validating XML using the Xerces DOM parser Helen Java 0 03-02-2004 12:37 AM



Advertisments