|
|
Any recommendations for what we can use for XML parsing? I tried to use java.beans.XMLDecoder but it didn’t find it. Do we have any JAXP stuff in the BUG? |
|
|
I should have mentioned that I know some of the examples use Xerces, but it’s pretty big from what I recall. Is it what we should be using? |
|
|
Yes, Xerces is very large :) . We have people trying to squeeze every byte out that isn’t necessary and then the XML parser weighs in at 1.8 Mb. :) Well, try out the built-in XML parser available in com.buglabs.common/com.buglabs.util.XmlParser. It’s very very simple. If you need schema validation or namespace support you are out of luck though. We’d love to hear of some good light XML parsers with these features with standard APIs if anyone finds them. |
|
|
Great. I was running with Xerces (using SAX rather than DOM to be nice) but I'll try the built-in one when I get a chance. |
|
|
I used your built-in XmlParser class to parse my log file. It was unhappy when I used the parse(InputStream/Reader?) method but when I read my file line by line using a BufferReader and passed the lines to the XmlParser.parse(String) method it was happy. |
|
|
Dave, I actually had the same problem yesterday with a different issue. I’ll have to take a look at the stream handing code. |
|
|
I’ve posted a howto for the built-in XML parser here: |