Examples of MXSerializer


Examples of org.codehaus.plexus.util.xml.pull.MXSerializer

     * @throws java.io.IOException
     */
    public void write( OutputStream stream, LifecycleConfiguration lifecycleConfiguration )
        throws java.io.IOException
    {
        XmlSerializer serializer = new MXSerializer();
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n" );
        serializer.setOutput( stream, lifecycleConfiguration.getModelEncoding() );
        serializer.startDocument( lifecycleConfiguration.getModelEncoding(), null );
        writeLifecycleConfiguration( lifecycleConfiguration, "lifecycles", serializer );
        serializer.endDocument();
    } //-- void write( OutputStream, LifecycleConfiguration )
View Full Code Here

Examples of org.codehaus.plexus.util.xml.pull.MXSerializer

     * @throws java.io.IOException
     */
    public void write( Writer writer, ProfilesRoot profilesRoot )
        throws java.io.IOException
    {
        XmlSerializer serializer = new MXSerializer();
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n" );
        serializer.setOutput( writer );
        serializer.startDocument( profilesRoot.getModelEncoding(), null );
        writeProfilesRoot( profilesRoot, "profilesXml", serializer );
        serializer.endDocument();
    } //-- void write( Writer, ProfilesRoot )
View Full Code Here

Examples of org.codehaus.plexus.util.xml.pull.MXSerializer

     * @throws java.io.IOException
     */
    public void write( Writer writer, Model model )
        throws java.io.IOException
    {
        XmlSerializer serializer = new MXSerializer();
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n" );
        serializer.setOutput( writer );
        serializer.startDocument( model.getModelEncoding(), null );
        writeModel( model, "project", serializer );
        serializer.endDocument();
    } //-- void write( Writer, Model )
View Full Code Here

Examples of org.codehaus.plexus.util.xml.pull.MXSerializer

     * @throws java.io.IOException
     */
    public void write( OutputStream stream, Model model )
        throws java.io.IOException
    {
        XmlSerializer serializer = new MXSerializer();
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n" );
        serializer.setOutput( stream, model.getModelEncoding() );
        serializer.startDocument( model.getModelEncoding(), null );
        writeModel( model, "project", serializer );
        serializer.endDocument();
    } //-- void write( OutputStream, Model )
View Full Code Here

Examples of org.codehaus.plexus.util.xml.pull.MXSerializer

     * @throws java.io.IOException
     */
    public void write( Writer writer, PersistedToolchains persistedToolchains )
        throws java.io.IOException
    {
        XmlSerializer serializer = new MXSerializer();
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n" );
        serializer.setOutput( writer );
        serializer.startDocument( persistedToolchains.getModelEncoding(), null );
        writePersistedToolchains( persistedToolchains, "toolchains", serializer );
        serializer.endDocument();
    } //-- void write( Writer, PersistedToolchains )
View Full Code Here

Examples of org.codehaus.plexus.util.xml.pull.MXSerializer

     * @throws java.io.IOException
     */
    public void write( OutputStream stream, PersistedToolchains persistedToolchains )
        throws java.io.IOException
    {
        XmlSerializer serializer = new MXSerializer();
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
        serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-line-separator", "\n" );
        serializer.setOutput( stream, persistedToolchains.getModelEncoding() );
        serializer.startDocument( persistedToolchains.getModelEncoding(), null );
        writePersistedToolchains( persistedToolchains, "toolchains", serializer );
        serializer.endDocument();
    } //-- void write( OutputStream, PersistedToolchains )
View Full Code Here

Examples of org.xmlpull.mxp1_serializer.MXSerializer

   *            The specified XmlElement
   * @return The XML string
   */
  public static String xmlElementToString(
      org.xmlpull.v1.builder.XmlElement element) {
    MXSerializer serializer = new MXSerializer();
    StringWriter writer = new StringWriter();
    serializer.setOutput(writer);
    serializer.setProperty(PROPERTY_SERIALIZER_INDENTATION, INDENT);
    BUILDER3.serialize(element, serializer);
    String xmlText = writer.toString();
    return xmlText;
  }
View Full Code Here

Examples of org.xmlpull.mxp1_serializer.MXSerializer

        }
    }

    public static String prettyPrint2String(XmlElement ele) {
        try {
            MXSerializer serializer = new MXSerializer();
            StringWriter writer = new StringWriter();
            serializer.setOutput(writer);
            serializer.setProperty(PROPERTY_SERIALIZER_INDENTATION, INDENT);
            XmlConstants.BUILDER.serialize(ele, serializer);
            return writer.toString();
        } catch (Exception e) {
            e.printStackTrace();
            return "Error happend pretty printing";
View Full Code Here

Examples of org.xmlpull.mxp1_serializer.MXSerializer

        return errStrW.getBuffer().toString();
    }

    public static String prettyPrint2String(XmlElement ele) {
        try {
            MXSerializer serializer = new MXSerializer();
            StringWriter writer = new StringWriter();
            serializer.setOutput(writer);
            serializer.setProperty(PROPERTY_SERIALIZER_INDENTATION, INDENT);
            XmlConstants.BUILDER.serialize(ele, serializer);
            return writer.toString();
        } catch (Exception e) {
            e.printStackTrace();
            return "Error happend pretty printing";
View Full Code Here

Examples of org.xmlpull.mxp1_serializer.MXSerializer

        return errStrW.getBuffer().toString();
    }

    public static String prettyPrint2String(XmlElement ele) {
        try {
            MXSerializer serializer = new MXSerializer();
            StringWriter writer = new StringWriter();
            serializer.setOutput(writer);
            serializer.setProperty(PROPERTY_SERIALIZER_INDENTATION, INDENT);
            XmlConstants.BUILDER.serialize(ele, serializer);
            return writer.toString();
        } catch (Exception e) {
            e.printStackTrace();
            return "Error happend pretty printing";
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.