@Override protected void marshalXmlStreamWriter(Object graph, XMLStreamWriter streamWriter) throws XmlMappingException { try { MarshallingContext marshallingContext = (MarshallingContext) createMarshallingContext(); IXMLWriter xmlWriter = new StAXWriter(marshallingContext.getNamespaces(), streamWriter); marshallingContext.setXmlWriter(xmlWriter); marshallingContext.marshalDocument(graph); } catch (JiBXException ex) { throw convertJibxException(ex, false); } }
@Override protected void marshalXmlStreamWriter(Object graph, XMLStreamWriter streamWriter) throws XmlMappingException { try { MarshallingContext marshallingContext = (MarshallingContext) createMarshallingContext(); IXMLWriter xmlWriter = new StAXWriter(marshallingContext.getNamespaces(), streamWriter); marshallingContext.setXmlWriter(xmlWriter); marshallingContext.marshalDocument(graph); } catch (JiBXException ex) { throw convertJibxException(ex, false); } }
IXMLWriter writer = new StAXWriter(nss, xmlWriter); IMarshallingContext ctx = bindingFactory.createMarshallingContext(); ctx.setXmlWriter(writer);
public void write(Object obj, XMLStreamWriter output) { try { IBindingFactory factory = BindingDirectory.getFactory(obj.getClass()); IMarshallingContext ctx = getMarshallingContext(obj); StAXWriter writer = new StAXWriter(factory.getNamespaces(), output); ctx.setXmlWriter(writer); ((IMarshallable)obj).marshal(ctx); } catch (Exception e) { throw new RuntimeException(e); } }
public void write(Object obj, XMLStreamWriter output) { try { IBindingFactory factory = BindingDirectory.getFactory(obj.getClass()); IMarshallingContext ctx = getMarshallingContext(obj); StAXWriter writer = new StAXWriter(factory.getNamespaces(), output); ctx.setXmlWriter(writer); ((IMarshallable)obj).marshal(ctx); } catch (Exception e) { throw new RuntimeException(e); } }
IBindingFactory factory = BindingDirectory.getFactory(obj.getClass()); IMarshallingContext ctx = getMarshallingContext(obj); StAXWriter writer = new StAXWriter(factory.getNamespaces(), output); ctx.setXmlWriter(writer); ((IMarshallable)obj).marshal(ctx);
protected void marshalXmlStreamWriter(Object graph, XMLStreamWriter streamWriter) throws XmlMappingException { try { MarshallingContext marshallingContext = (MarshallingContext) createMarshallingContext(); IXMLWriter xmlWriter = new StAXWriter(marshallingContext.getNamespaces(), streamWriter); marshallingContext.setXmlWriter(xmlWriter); marshallingContext.marshalDocument(graph); } catch (JiBXException ex) { throw convertJibxException(ex, false); } }