Example usage for org.dom4j.io XMLResult XMLResult

List of usage examples for org.dom4j.io XMLResult XMLResult

Introduction

In this page you can find the example usage for org.dom4j.io XMLResult XMLResult.

Prototype

public XMLResult(XMLWriter xmlWriter) 

Source Link

Usage

From source file:dz.alkhwarizmix.framework.java.utils.impl.XMLUtil.java

License:Open Source License

/**
 * TODO: Javadoc/*  w  ww . j  a v  a  2s. c o m*/
 */
@Override
public final String objectListToXML(final List<AbstractAlKhwarizmixDomainObject> objectList) {
    final StringWriter stringWriter = new StringWriter();
    final XMLResult xmlResult = new XMLResult(stringWriter);
    for (final AbstractAlKhwarizmixDomainObject object : objectList)
        jaxb2Marshaller.marshal(object, xmlResult);
    return stringWriter.toString();
}