Ilya,
I can marshal java objects into binary xml using
com.sun.xml.fastinfoset.stax.StAXDocumentSerializer;
IMarshallingContext mctx1 = bfact.createMarshallingContext();
mctx1.setIndent(2);
FileOutputStream outFi = new FileOutputStream("out.fi");
StAXDocumentSerializer sw = new StAXDocumentSerializer();
// Set the output stream
sw.setOutputStream(outFi);
mctx.setXmlWriter(new StAXWriter(bfact.getNamespaces(), sw));
sw.writeStartDocument();
mctx.marshalDocument(customer);
sw.writeEndDocument();
But I cannot unmarshal it like
IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
XMLStreamReader streamReader = new StAXDocumentParser(new
FileInputStream("filename.xml"));
Object obj = uctx.unmarshalDocument
(streamReader, null);
In the current state of jibx I have to create
org.jibx.runtime.impl.StAXReaderFactory and set it's name as system
property which means that it wouldn't be possible to switch xml
encoding during runtime.
In general if "someone asks about (are you going to support XXX)" it
means that design is not extensible thus someone cannot do it himself
like xml parser selection.
Thanks,
/T
On 4/12/07, Ilya Sterin <[EMAIL PROTECTED]> wrote:
> It's always questionable when someone asks about (are you going to
> support XXX). Fast Infoset is just a binary encoding for the
> traditional XML infoset. When your object is marshalled into an XML
> representation it can then be encoded into the XML infoset utilizing
> any other infoset support available out there. When you say support,
> do you mean bypassing the xml infoset representation and going
> directly to FI?
>
> Also, JiBX does support stax. You can find the information here...
> http://jibx.sourceforge.net/runtime.html#stax
>
> Ilya
>
>
> On 4/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > Are there any plans to support Fastinfoset?
> > Or at least select Stax implementation at runtime?
> >
> > Thanks,
> >
> > /T
> > -------------------------------------------------------------------------
> > Take Surveys. Earn Cash. Influence the Future of IT
> > Join SourceForge.net's Techsay panel and you'll get the chance to share your
> > opinions on IT & business topics through brief surveys-and earn cash
> > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> > _______________________________________________
> > jibx-devs mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jibx-devs
> >
> >
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> jibx-devs mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jibx-devs
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
jibx-devs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-devs