@Override protected Object unmarshalXmlStreamReader(XMLStreamReader streamReader) { try { UnmarshallingContext unmarshallingContext = (UnmarshallingContext) createUnmarshallingContext(); IXMLReader xmlReader = new StAXReaderWrapper(streamReader, null, true); unmarshallingContext.setDocument(xmlReader); return unmarshallingContext.unmarshalElement(); } catch (JiBXException ex) { throw convertJibxException(ex, false); } }
protected Object unmarshalXmlStreamReader(XMLStreamReader streamReader) { try { UnmarshallingContext unmarshallingContext = (UnmarshallingContext) createUnmarshallingContext(); IXMLReader xmlReader = new StAXReaderWrapper(streamReader, null, true); unmarshallingContext.setDocument(xmlReader); return unmarshallingContext.unmarshalElement(); } catch (JiBXException ex) { throw convertJibxException(ex, false); } }
@Override protected Object unmarshalXmlStreamReader(XMLStreamReader streamReader) { try { UnmarshallingContext unmarshallingContext = (UnmarshallingContext) createUnmarshallingContext(); IXMLReader xmlReader = new StAXReaderWrapper(streamReader, null, true); unmarshallingContext.setDocument(xmlReader); return unmarshallingContext.unmarshalElement(); } catch (JiBXException ex) { throw convertJibxException(ex, false); } }
private static UnmarshallingContext getUnmarshallingContext(XMLStreamReader reader, Class jtype) throws JiBXException { IBindingFactory factory; if (JibxSimpleTypes.isSimpleType(jtype)) { factory = JibxNullBindingFactory.getFactory(); } else { factory = BindingDirectory.getFactory(jtype); } UnmarshallingContext ctx = (UnmarshallingContext)factory.createUnmarshallingContext(); StAXReaderWrapper wrapper = new StAXReaderWrapper(reader, "Data-element", true); ctx.setDocument(wrapper); ctx.toTag(); return ctx; }
private static UnmarshallingContext getUnmarshallingContext(XMLStreamReader reader, Class<?> jtype) throws JiBXException { IBindingFactory factory; if (JibxSimpleTypes.isSimpleType(jtype)) { factory = JibxNullBindingFactory.getFactory(); } else { factory = BindingDirectory.getFactory(jtype); } UnmarshallingContext ctx = (UnmarshallingContext)factory.createUnmarshallingContext(); StAXReaderWrapper wrapper = new StAXReaderWrapper(reader, "Data-element", true); ctx.setDocument(wrapper); ctx.toTag(); return ctx; } }