"[EMAIL PROTECTED]" wrote : Are you talking about JAXB2 here? Where can I find 
the info about JAXBContext using XMLStreamingReader?
  | Thanks.

Yes JAXB2. If you look at the EDR javadoc, the Marshaller/Unmarshaller 
interfaces which are pulled from the JAXBContext, have overloaded marshall, and 
unmarshall methods which support both XMLStreamReader/XMLStreamWriter and 
XMLEvenetReader/XMLEventWriter.

Here is an unmarshalling example using the stream reader

  | XMLStreamReader xmlStreamReader = 
  |       XMLInputFactory().newInstance().createXMLStreamReader( ... );
  | JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
  | Unmarshaller u = jc.createUnmarshaller();
  | Object o = u.unmarshal( xmlStreamReader );
  | 

And here is a marshalling example

  | ComplexObject obj = ...;
  | XMLStreamWriter xmlStreamWriter = 
  |            XMLOutputFactory.newInstance().createXMLStreamWriter( ... );
  | JAXBContext jc = JAXBContext.newInstance( "com.acme.foo" );
  | Marshaller m = jc.createMarshaller();
  | m.marshal( obj, xmlStreamWriter );
  | 

Thanks,
-Jason





View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3859042#3859042

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3859042


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to