Package org.apache.xml.serialize

Examples of org.apache.xml.serialize.XMLSerializer.asDocumentHandler()


                                               System.getProperty("file.separator") + "WEB-INF"+
                                               System.getProperty("file.separator") + "web.xml");
            XMLSerializer serializer = new XMLSerializer(writer, of);
            try {
            Marshaller marshaller =
                new Marshaller(serializer.asDocumentHandler());
            marshaller.setMapping(mappingWebXml);
            marshaller.marshal(webApp);
            } catch (Exception e) {
                writer.close();
                e.printStackTrace(System.out);
View Full Code Here


            new FileWriter(webAppsDir + webModule +
                                           SystemUtils.FILE_SEPARATOR + "WEB-INF"+
                                           SystemUtils.FILE_SEPARATOR + "web.xml");
        XMLSerializer serializer = new XMLSerializer(writer, of);
        try {
            Marshaller marshaller = new Marshaller(serializer.asDocumentHandler());
            marshaller.setMapping(mappingWebXml);
            marshaller.marshal(webApp);
        } finally {
            writer.close();
        }
View Full Code Here

            new FileWriter(webAppsDir + webModule +
                                           SystemUtils.FILE_SEPARATOR + "WEB-INF"+
                                           SystemUtils.FILE_SEPARATOR + "web.xml");
        XMLSerializer serializer = new XMLSerializer(writer, of);
        try {
            Marshaller marshaller = new Marshaller(serializer.asDocumentHandler());
            marshaller.setMapping(mappingWebXml);
            marshaller.marshal(webApp);
        } finally {
            writer.close();
        }
View Full Code Here

            // page and folder menu definition menu elements ordered
            // polymorphic collection to strip artifical <menu-element>
            // tags enabling Castor XML binding; see JETSPEED-INF/castor/page-mapping.xml
            writer = new OutputStreamWriter(new FileOutputStream(f), PSML_DOCUMENT_ENCODING);
            Serializer serializer = new XMLSerializer(writer, this.format);
            final DocumentHandler handler = serializer.asDocumentHandler();
            Marshaller marshaller = new Marshaller(new DocumentHandler()
                {
                    private int menuDepth = 0;

                    public void characters(char[] ch, int start, int length) throws SAXException
View Full Code Here

                                               System.getProperty("file.separator") + "WEB-INF"+
                                               System.getProperty("file.separator") + "web.xml");
            XMLSerializer serializer = new XMLSerializer(writer, of);
            try {
            Marshaller marshaller =
                new Marshaller(serializer.asDocumentHandler());
            marshaller.setMapping(mappingWebXml);
            marshaller.marshal(webApp);
            } catch (Exception e) {
                writer.close();
                e.printStackTrace(System.out);
View Full Code Here

               
                XMLSerializer ser;
                _format = new OutputFormat( Method.XML, _response.getCharacterEncoding(), false );
                ser = new XMLSerializer( _format );
                ser.setOutputCharStream( getWriter() );
                _resultHandler = new ResultHandlerAdapter(ser.asDocumentHandler());
            } else {
                Serializer ser;
               
                _format.setEncoding( _response.getCharacterEncoding() );
                ser = SerializerFactory.getSerializerFactory( _format.getMethod() ).makeSerializer( _format );
View Full Code Here

                Serializer ser;
               
                _format.setEncoding( _response.getCharacterEncoding() );
                ser = SerializerFactory.getSerializerFactory( _format.getMethod() ).makeSerializer( _format );
                ser.setOutputCharStream( getWriter() );
                _resultHandler = new ResultHandlerAdapter(ser.asDocumentHandler());
            }
            _response.setContentType( "text/" + _format.getMethod() );

            if ( _stylesheet != null ) {
                SAXInput saxInput = new SAXInput();
View Full Code Here

            // create the serializer output format
            OutputFormat format = new OutputFormat();
            format.setIndenting(true);
            format.setIndent(4);
            Serializer serializer = new XMLSerializer(writer,format);
            Marshaller marshaller = new Marshaller(serializer.asDocumentHandler());
            marshaller.setMapping(this.loadMapping());
            marshaller.marshal(doc.getPortlets());

            success = true;
        }
View Full Code Here

            // create the serializer output format
            OutputFormat format = new OutputFormat();
            format.setIndenting(true);
            format.setIndent(4);
            Serializer serializer = new XMLSerializer(writer,format);
            Marshaller marshaller = new Marshaller(serializer.asDocumentHandler());
            marshaller.setMapping(this.loadMapping());
            marshaller.marshal(doc.getPortlets());

            success = true;
        }
View Full Code Here

        if (portlets != null)
        {
            format.setEncoding(encoding);
            Serializer serializer = new XMLSerializer(writer, format);
            Marshaller marshaller = new Marshaller(serializer.asDocumentHandler());
            marshaller.setMapping(this.mapping);
            marshaller.marshal(portlets);
        }
    }
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.