Fast, lightweight XML parser

Posted by joe90 on Stack Overflow See other posts from Stack Overflow or by joe90
Published on 2010-01-25T18:16:26Z Indexed on 2010/06/17 14:53 UTC
Read the original article Hit count: 328

Filed under:
|
|
|

I have a specific format XML document that I will get pushed. This document will always be the same type so it's very strict.

I need to parse this so that I can convert it into JSON (well, a slightly bastardized version so someone else can use it with DOJO).

My question is, shall I use a very fast lightweight (no need for SAX, etc.) XML parser (any ideas?) or write my own, basically converting into a StringBuffer and spinning through the array? Basically, under the covers I assume all HTML parsers will spin thru the string (or memory buffer) and parse, producing output on the way through.

Thanks

//edit

Thanks for the responses so far :)

The xml will be between 3/4 lines to about 50 max (at the extreme)..

© Stack Overflow or respective owner

Related posts about java

Related posts about Xml