I can't imagine what an "optimum size of an XML file" is since there are so many possible uses for XML.
That said, there are optimizations which may be applicable, depending on the circumstances.
If bandwidth is a problem you might look into "fast infoset" encoding and zip compression. Zip compression can easily cut transmission size by a factor of ten due to the highly repetitive nature of XML tags. If you have control over creation of the XML, using short tag names and eliminating namespaces will save bandwidth and parsing time.
It is also likely that using SAX style parsing will be much faster and use less memory then DOM style processing. Probably writing the code will be a bit harder but the saving is HUGE.
Joined: Oct 13, 2009
Thanks a lot Bill, I greatly appreciate your input !
On a different note,
I thought XML pull prsers are the fasest as of today. However in an issue of ACM (Association for Computing Machinery) journal I read about an upcoming XML parser which will be even faster. However unfortunately I don't remember the name of the parser. Do you have any idea about this?
Author and all-around good cowpoke
Joined: Mar 22, 2000
I have not seen anything new in parser speed for several years. Back when XML parsers in Java were just getting started, there was a lot of competition but it seems to have settled down.