Package groovy.xml

Examples of groovy.xml.StreamingMarkupBuilder


     * @throws UnsupportedEncodingException
     */
    public HttpEntity encodeXML( Object xml, Object contentType )
            throws UnsupportedEncodingException {
        if ( xml instanceof Closure ) {
            StreamingMarkupBuilder smb = new StreamingMarkupBuilder();
            xml = smb.bind( xml );
        }
        if ( contentType == null ) contentType = ContentType.XML;
        return createEntity( contentType, xml.toString() );
    }
View Full Code Here


        }

        // sets the body of the message
        if (msgAttr.containsKey(XML_BODY_ATTR)) {
            msgBuilder.asXml(true);
            Object xml = new StreamingMarkupBuilder().bind(msgAttr.get(XML_BODY_ATTR));
            msgBuilder.withBody(String.valueOf(xml));
        } else if (msgAttr.containsKey(TEXT_BODY_ATTR)) {
            msgBuilder.withBody(String.valueOf(msgAttr.get(TEXT_BODY_ATTR)));
        }
View Full Code Here

TOP

Related Classes of groovy.xml.StreamingMarkupBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.