Re: [Simple-support] xjc created jaxb source from XML schema to simpleframework
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2011-09-12 03:32:24
|
Great! this looks cool. I will take a look. Thanks, Niall --- On Sun, 11/9/11, Dennis Bijwaard <bij...@gm...> wrote: > From: Dennis Bijwaard <bij...@gm...> > Subject: [Simple-support] xjc created jaxb source from XML schema to simpleframework > To: sim...@li... > Received: Sunday, 11 September, 2011, 5:52 AM > Dear all, > > I've written a SED script to convert java source files > gerated with xjc > (from XML schema workig with JAXB) to > simpleframework-compatible source code. > It depends a bit on the way xjc generates the software, so > it may not > work directly on hand-written jaxb source code. > > The script works as follows (tested on Ubuntu Linux): > - generate source with xjc: xjc XMLSchema.xsd > - jaxb2simple.sed generated/JAXBSource.java > > src/generated/SimpleSource.java > - or in batch with the rewrite script: > NAMESPACE=generated > cd $NAMESPACE > for i in *.java ;do ../../rewrite.sh $i > ../$NAMESPACE/ddi/$i ;done > > The generated code can now be used on android with simple. > Some things may > need to be fixed, since I didn't test yet with an XSD > covering all concepts, > and because simpleframework defaults to require all > elements (opposed to > jaxb). Expect fixes for emply lists, and enumerations of > strings (Android > does not seem to return valueOf correctly when casing of > remaining > letters does not match enum name). > > Kind regards, > Dennis Bijwaard > > -----Inline Attachment Follows----- > > ------------------------------------------------------------------------------ > Using storage to extend the benefits of virtualization and > iSCSI > Virtualization increases hardware utilization and delivers > a new level of > agility. Learn what those decisions are and how to > modernize your storage > and backup environments for virtualization. > http://www.accelacomm.com/jaw/sfnl/114/51434361/ > -----Inline Attachment Follows----- > > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support > |