Are xML parsers(provided by standard libraries ) faster than custom written parsers if so, Why ?
+4
A:
Custom written parsers for what? Still XML? If so, I'd expect standard libraries to generally have higher quality, faster, more robust code than code written by J Random Developer. After all, the standard libraries tend to have a lot of resources behind them and the parsers will be widely used - flushing out bugs relatively quickly.
Having said that, XML isn't particularly parser-friendly. If you're comparing "parsing XML using standard libraries" with "parsing a custom data format using custom code" then the custom data format may well be a lot faster, if it's well-designed for the specific task.
Given all these caveats, could you clarify your question?
Jon Skeet
2008-10-22 06:15:18
OK. I have this product from IBM and I have done some research and analysis on what IBM claims.They claim that the IBM product can parse XML message much faster than other non-xML messages.I did some test and found out it was rite. therefore my question.
zamfir
2008-10-22 06:24:04
Program X can parse XML faster than the same program can parse non-XML? Well, that entirely depends on program X. If it's claiming that program X can parse XML faster than anything else can parse its own custom data format, that's a ridiculous claim. Could you link to the *exact* claim?
Jon Skeet
2008-10-22 06:33:55