[gatein-dev] XML Parsing, where do we stand
Thomas Heute
theute at redhat.com
Thu Feb 24 05:54:40 EST 2011
Nick, Julien, Alain,
As said before we'd like to harmonize the XML parsing accross the GateIn
projects. Let's kill this once for all...
It doesn't mean we would change the existing parsers overnight but it
means we will impose a way for any new parsing (or when we decide to
rewrite a parser).
If we need parser tools, they will go in Common module ultimately. There
might be a phase when the code will be duplicated (as Nick's tools need
to work on an untouched portal where upgrading common is not an option).
We already agreed that StAX as a base was the way to go, I hope we still
agree ;)
Let's separate in reading/writing XML (doesn't necessarily necessarily
mean marhalling/unmarshalling BTW) and agree on both.
Reading XML:
Option 1:
Plain StAX, JBoss AS 7 uses that (in fact they use StAX Mapper,
a very lightweight library made by the JBoss AS7 team.
https://github.com/jbossas/staxmapper/ which only helps to work with
multiple namespaces + some little helpers for ignoring part of the file,
format the XML when writing...)
One example of JBoss AS 7 parsing file:
https://github.com/emuckenhuber/jboss-as/blob/master/web/src/main/java/org/jboss/as/web/WebSubsystemParser.java
Option 2:
Nick's stuff (please explain advantages/drawbacks)
Option 3:
Julien/Alain's stuff (please explain advantages/drawbacks)
Writing XML:
Option 1:
Plain StAX (well-formed guaranteed over plain Writer)
Option 2:
Nick's stuff (please explain advantages/drawbacks)
Option 3:
Julien/Alain's stuff (please explain advantages/drawbacks)
Note that there are other utilities and frameworks based on StAX:
Stax-Utils: http://stax-utils.dev.java.net/
StaxMate: http://wiki.fasterxml.com/StaxMateHome
Apache Axiom: http://ws.apache.org/commons/axiom/
Thomas/
/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/gatein-dev/attachments/20110224/fc361694/attachment.html
More information about the gatein-dev
mailing list