Examples of XmlOptions


Examples of org.apache.xmlbeans.XmlOptions

            environmentType = (EnvironmentType) xmlObject;
        } else {
            environmentType = (EnvironmentType) xmlObject.copy().changeType(EnvironmentType.type);
        }
        try {
            XmlOptions xmlOptions = new XmlOptions();
            xmlOptions.setLoadLineNumbers();
            Collection errors = new ArrayList();
            xmlOptions.setErrorListener(errors);
            if (!environmentType.validate(xmlOptions)) {
                throw new XmlException("Invalid deployment descriptor: " + errors + "\nDescriptor: " + environmentType.toString(), null, errors);
            }
        } catch (XmlException e) {
            throw new DeploymentException(e);
View Full Code Here

Examples of org.apache.xmlbeans.XmlOptions

    }

    public String getAsText() {
        Environment environment = (Environment) getValue();
        EnvironmentType environmentType = buildEnvironmentType(environment);
        XmlOptions xmlOptions = new XmlOptions();
        xmlOptions.setSaveSyntheticDocumentElement(QNAME);
        xmlOptions.setSavePrettyPrint();
        return environmentType.xmlText(xmlOptions);
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlOptions

    public SchemaTypeSystem compileSchemaTypeSystem(Definition definition) throws DeploymentException {
        List schemaList = new ArrayList();
        addImportsFromDefinition(definition, schemaList);
//        System.out.println("Schemas: " + schemaList);
        Collection errors = new ArrayList();
        XmlOptions xmlOptions = new XmlOptions();
        xmlOptions.setErrorListener(errors);
        xmlOptions.setEntityResolver(new JarEntityResolver());
        XmlObject[] schemas = (XmlObject[]) schemaList.toArray(new XmlObject[schemaList.size()]);
        try {
            SchemaTypeSystem schemaTypeSystem = XmlBeans.compileXsd(schemas, basicTypeSystem, xmlOptions);
            if (errors.size() > 0) {
                boolean wasError = false;
View Full Code Here

Examples of org.apache.xmlbeans.XmlOptions

        }
    }

    static XmlObject parseWithNamespaces(Element element, Map namespaceMap) throws XmlException {
        ArrayList errors = new ArrayList();
        XmlOptions xmlOptions = XmlBeansUtil.createXmlOptions(errors);
        SchemaDocument parsed = SchemaDocument.Factory.parse(element, xmlOptions);
        if (errors.size() != 0) {
            throw new XmlException(errors.toArray().toString());
        }
        XmlCursor cursor = parsed.newCursor();
View Full Code Here

Examples of org.apache.xmlbeans.XmlOptions

    }

    protected void XsetUp() throws Exception {
        File docDir = new File("src/test-data/connector_1_0");
        j2eeDD = new File(docDir, "ra.xml").toURL();
        xmlOptions = new XmlOptions();
        xmlOptions.setLoadLineNumbers();
        errors = new ArrayList();
        xmlOptions.setErrorListener(errors);
    }
View Full Code Here

Examples of org.apache.xmlbeans.XmlOptions

    public void upgrade(InputStream source, Writer target) throws IOException, XmlException {
        XmlObject xmlObject = parse(source);
        xmlObject = upgrade(xmlObject);

        XmlOptions xmlOptions = new XmlOptions();
        xmlOptions.setSavePrettyPrint();
        xmlObject.save(target, xmlOptions);

    }
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.eclipse.emf.ecore.xmi.XMLOptions

      }
    }
 
    resource = (XMLResource)resourceSet.createResource(URI.createURI("http:///temp.xml"));
   
    XMLOptions xmlOptions = new XMLOptionsImpl();
    xmlOptions.setProcessAnyXML(true);
    resource.getDefaultLoadOptions().put(XMLResource.OPTION_XML_OPTIONS, xmlOptions);

    resource.getDefaultSaveOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetaData);
    resource.getDefaultLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, extendedMetaData);
   
View Full Code Here

Examples of org.jibx.ws.io.XmlOptions

    
     * @return XML formatting options
     */
    public XmlOptions getXmlOptions() {
        if (m_xmlOptions == null) {
            m_xmlOptions = new XmlOptions();
        }
        return m_xmlOptions;
    }
View Full Code Here

Examples of org.jibx.ws.io.XmlOptions

    private MessageProperties m_properties;

    private XmlOptions m_options;

    private StubbedChannel() {
        m_options = new 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.