Examples of XmlOptions


Examples of org.apache.xmlbeans.XmlOptions

    /**
     * @return
     */
    public String toXML()
    {
        return m_propsDocXBean.xmlText( new XmlOptions().setSavePrettyPrint() );
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlOptions

    {
        StringBuffer buf = new StringBuffer();
        for ( int i = 0; i < m_propElems.size(); i++ )
        {
            XmlObject propXBean = (XmlObject) m_propElems.get( i );
            buf.append( propXBean.xmlText( new XmlOptions().setSaveOuter().setSavePrettyPrint() ) );
        }
        return buf.toString();
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlOptions

            log.error("Unable to write deployment plan", e);
        }
    }

    private void savePlanToStream(XmlObject object, Writer out) throws IOException {
        XmlOptions options = new XmlOptions();
        options.setSavePrettyPrint();
        options.setSavePrettyPrintIndent(4);
        options.setUseDefaultNamespace();
        object.save(out, options);
        out.close();
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlOptions

        }
        return parsed;
    }

    public static XmlOptions createXmlOptions(Collection errors) {
        XmlOptions options = new XmlOptions();
        options.setLoadLineNumbers();
        options.setErrorListener(errors);
        options.setLoadSubstituteNamespaces(NAMESPACE_UPDATES);
        return options;
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlOptions

        validateDD(out);
        return out;
    }

    public static void validateDD(XmlObject dd) throws XmlException {
        XmlOptions xmlOptions = new XmlOptions();
        xmlOptions.setLoadLineNumbers();
        Collection errors = new ArrayList();
        xmlOptions.setErrorListener(errors);
        try {
            if (!dd.validate(xmlOptions)) {

                for (Iterator iterator = errors.iterator(); iterator.hasNext();) {
                    Object o = iterator.next();
View Full Code Here

Examples of org.apache.xmlbeans.XmlOptions

            log.error("Unable to write deployment plan", e);
        }
    }

    private void savePlanToStream(XmlObject object, Writer out) throws IOException {
        XmlOptions options = new XmlOptions();
        options.setSavePrettyPrint();
        options.setSavePrettyPrintIndent(4);
        options.setUseDefaultNamespace();
        object.save(out, options);
        out.close();
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlOptions

    public void removePropertyChangeListener(PropertyChangeListener pcl) {
        pcs.removePropertyChangeListener(pcl);
    }

    public void toXML(OutputStream outputStream) throws IOException {
        XmlOptions options = new XmlOptions();
        options.setSavePrettyPrint();
        options.setSavePrettyPrintIndent(4);
        options.setUseDefaultNamespace();
        xmlObject.save(outputStream, options);
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlOptions

   *
   * @param out The stream to write to.
   * @throws IOException if an error occurs while writing.
   */
  public void writeTo(OutputStream out) throws IOException {
    XmlOptions options = new XmlOptions(DEFAULT_XML_OPTIONS);

    // Work on the current one
    // Need to do this, as we don't handle
    //  all the possible entries yet

View Full Code Here

Examples of org.apache.xmlbeans.XmlOptions

            FileOutputStream out = new FileOutputStream(f);

            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);
                }
View Full Code Here

Examples of org.apache.xmlbeans.XmlOptions

    }

    private Map parse(File schema1) throws IOException, XmlException, DeploymentException, URISyntaxException {
        XmlObject xmlObject = XmlBeansUtil.parse(schema1.toURL());
        Collection errors = new ArrayList();
        XmlOptions xmlOptions = new XmlOptions();
        xmlOptions.setErrorListener(errors);
        XmlObject[] schemas = new XmlObject[] {xmlObject};
        SchemaTypeLoader schemaTypeLoader = XmlBeans.loadXsd(new XmlObject[] {});
        SchemaTypeSystem schemaTypeSystem;
        try {
            schemaTypeSystem = XmlBeans.compileXsd(schemas, schemaTypeLoader, xmlOptions);
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.