BUG Community

Welcome! Log In

Forums BUG SDK XML parsing

Subscribe to XML parsing  7 posts, 2 voices

Log in to reply to this topic
 
Oct 14, 2007 12:28pm
Medium Bug Labs team finsprings 268 posts

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?

Oct 14, 2007 6:08pm
Medium Bug Labs team finsprings 268 posts

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?

Oct 15, 2007 9:09am
Medium Bug Labs team kgilmer 215 posts

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.

Oct 15, 2007 10:16am
Medium Bug Labs team finsprings 268 posts

kengilmer
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.
Oct 16, 2007 12:04pm
Medium Bug Labs team finsprings 268 posts

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.

Oct 16, 2007 4:57pm
Medium Bug Labs team kgilmer 215 posts

Dave,

I actually had the same problem yesterday with a different issue. I’ll have to take a look at the stream handing code.

Feb 12, 2008 7:13pm
Medium Bug Labs team kgilmer 215 posts

I’ve posted a howto for the built-in XML parser here:

http://bugcommunity.com/wiki/index.php/BUG_XML_…

Log in to reply to this topic
Forums BUG SDK XML parsing