are those xml parsers worth beans?
-
Okay. I gotta read in some xml files. I've checked out the xml parsers from apache (xerces) and oracle (xdk). I don't see why I can't just parse the dang xml files myself. I mean, it sure doesn't seem to ME that parsin these things would be hard. (ignoring unknown tags, etc). Anybody got any warnings for me about why I -should- use one of these things? They seem to add to the code pile and not give ya much in return. Any help? Thanks! Steve.
-
Okay. I gotta read in some xml files. I've checked out the xml parsers from apache (xerces) and oracle (xdk). I don't see why I can't just parse the dang xml files myself. I mean, it sure doesn't seem to ME that parsin these things would be hard. (ignoring unknown tags, etc). Anybody got any warnings for me about why I -should- use one of these things? They seem to add to the code pile and not give ya much in return. Any help? Thanks! Steve.
An incomplete XML parser, ie one that does not validate, would be easy enough. In fact there are 2 lightweight parsers on Codeproject, one of them (PugXML) is free. A full implementation is an massive Job, hence the enormous footprints of XML libs. Ryan.
-
Okay. I gotta read in some xml files. I've checked out the xml parsers from apache (xerces) and oracle (xdk). I don't see why I can't just parse the dang xml files myself. I mean, it sure doesn't seem to ME that parsin these things would be hard. (ignoring unknown tags, etc). Anybody got any warnings for me about why I -should- use one of these things? They seem to add to the code pile and not give ya much in return. Any help? Thanks! Steve.
Steve, You're probably right to be skeptical. Most XML parsers pull in huge amounts of code, to do very little. CMarkup is a very lightweight class that's easy to use and is ideal for "read-only" XML apps. HPS HwndSpy - GUI developer's aid to visually locate and inspect windows. For the month of August only, use coupon code CP-81239 for 30% off.
-
Okay. I gotta read in some xml files. I've checked out the xml parsers from apache (xerces) and oracle (xdk). I don't see why I can't just parse the dang xml files myself. I mean, it sure doesn't seem to ME that parsin these things would be hard. (ignoring unknown tags, etc). Anybody got any warnings for me about why I -should- use one of these things? They seem to add to the code pile and not give ya much in return. Any help? Thanks! Steve.
In my experience with using the MS XML parser, the results were fairly close to what you described (added to the code pile) plus giving my users the added benefit of extra time to go get that cup of coffee they need while my code plods through a 3MB XML file. Parsing the file manually speeds things up dramatically. To date I have not found an efficient parser, but that's mainly because all the good parsers have a lot of overhead while they make sure everything is kosher. In our situations we can probably make some assumptions about the particular file we're parsing, which can add to efficiency. -ar
-
In my experience with using the MS XML parser, the results were fairly close to what you described (added to the code pile) plus giving my users the added benefit of extra time to go get that cup of coffee they need while my code plods through a 3MB XML file. Parsing the file manually speeds things up dramatically. To date I have not found an efficient parser, but that's mainly because all the good parsers have a lot of overhead while they make sure everything is kosher. In our situations we can probably make some assumptions about the particular file we're parsing, which can add to efficiency. -ar
Are these comments all about DOM? I found that using SAX was harder work, but was quite a lot faster, since it does the basic recognition for you. Typically, we're handling XML in excess of 100Mb in a couple of minutes. Of course, processing (as opposed to loading) takes a bit longer :-) Steve S