Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.XmlObject.save()


                targetDir.mkdirs();
            }

            XmlOptions xmlOptions = new XmlOptions();
            xmlOptions.setSavePrettyPrint();
            doc.save(targetFile, xmlOptions);
           
            log.info("Generated: " + targetFile);
        }
        finally {
            xmlCursor.dispose();
View Full Code Here


                    targetDir.mkdirs();
                }

                XmlOptions xmlOptions = new XmlOptions();
                xmlOptions.setSavePrettyPrint();
                doc.save(targetFile, xmlOptions);

                if (getLog() != null) {
                    getLog().info("Generated: " + targetFile);
                }
            }
View Full Code Here

                continue;
            }
           
            try
            {
                doc.save(System.out, new XmlOptions().setSavePrettyPrint().setSavePrettyPrintIndent(indent));
            }
            catch (IOException e)
            {
                System.err.println("Unable to pretty print " + files[i] + ": " + e.getMessage());
            }
View Full Code Here

        map.put("urn:schemas-microsoft-com:vml", "v");
        map.put("urn:schemas-microsoft-com:office:office", "o");
        map.put("urn:schemas-microsoft-com:office:excel", "x");
        xmlOptions.setSaveSuggestedPrefixes(map);

        rootObject.save(out, xmlOptions);
    }

    @Override
    protected void commit() throws IOException {
        PackagePart part = getPackagePart();
View Full Code Here

            if(entry.getName().endsWith(".xml") || entry.getName().endsWith(".vml") || entry.getName().endsWith(".rels")){
                try {
                    XmlObject xml = XmlObject.Factory.parse(zip.getInputStream(entry));
                    XmlOptions options = new XmlOptions();
                    options.setSavePrettyPrint();
                    xml.save(out, options);
                } catch (Exception e){
                    System.err.println("Failed to parse " + entry.getName() + ", dumping raw content");
                    dump(zip.getInputStream(entry), out);
                }
            } else {
View Full Code Here

        throws MarshalException, JAXBException
    {
        XmlObject xmlobj = getXmlObject(obj);

        try {
            xmlobj.save(ch,  lh, _options);
        }
        catch (SAXException e) {
            throw new JAXBException(e);
        }
    }
View Full Code Here

        throws MarshalException, JAXBException
    {
        XmlObject xmlobj = getXmlObject(obj);

        try {
            xmlobj.save(out, _options);
        }
        catch (IOException e) {
            throw new JAXBException(e);
        }
    }
View Full Code Here

        throws MarshalException, JAXBException
    {
        XmlObject xmlobj = getXmlObject(obj);

        try {
            xmlobj.save(out,  _options);
        }
        catch (IOException e) {
            throw new JAXBException(e);
        }
    }
View Full Code Here

        nses.put( "y", "y.com" );
        XmlOptions options = new XmlOptions();
        options.setLoadAdditionalNamespaces( nses );
       
        XmlObject x = XmlObject.Factory.parse( "<a></a>", options );
        x.save( System.out );
    }
}
View Full Code Here

       
        Content content2 = new Content();

        XmlObject x = XmlObject.Factory.parse( xml );

        x.save( content2, content2 );

        // THEM

        SAXParserFactory spf = SAXParserFactory.newInstance();
        SAXParser sp = spf.newSAXParser();
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.