A Decent XML Parser

Since there isn’t one, I’ve started writing one myself. Main features:

  • Allows 100% round-tripping, even for weird whitespace between attributes in elements
  • Suitable for building editors and filters which want to preserve the original file layout
  • Error messages have line and column information
  • Easy to reuse
  • XML 1.0 compatible

You can download the latest sources here as a Maven 2 project.

2 Responses to A Decent XML Parser

  1. Arik Kfir says:

    Hi,

    Does it support schema (or others) validations?

  2. Aaron Digulla says:

    Not yet. For 1.2, I’m working on parsing DTD’s.

    As far as validation goes, I’m not yet convinced what’s the best way to proceed. DTD is too limited, XML Schema is very complex and still can’t cover all bases.

    Right now, I lean towards a pluggable interface which allows you to add any validation you like and where you can say when you want validation (for example, after modifying the XML to make sure it’s still valid).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: