Package org.apache.xmlbeans

Examples of org.apache.xmlbeans.SchemaTypeLoader.findDocumentType()


    {
        File inputfile1 = TestEnv.xbeanCase("schema/dynamic/dyntest2.xsd");
        SchemaTypeLoader loader = XmlBeans.loadXsd(new XmlObject[] { XmlObject.Factory.parse(inputfile1) });
        XmlObject result = loader.parse(TestEnv.xbeanCase("schema/dynamic/dyntest2.xml"), null, null);
        Assert.assertEquals("D=wrappedwildcard@http://openuri.org/test/dyntest", result.schemaType().toString());
        Assert.assertEquals(loader.findDocumentType(new QName("http://openuri.org/test/dyntest", "wrappedwildcard")),
                            result.schemaType());
        XmlCursor cur = result.newCursor();
        Assert.assertTrue("Should have a root element", cur.toFirstChild());
        result = cur.getObject();
        Assert.assertEquals("E=wrappedwildcard|D=wrappedwildcard@http://openuri.org/test/dyntest", result.schemaType().toString());
View Full Code Here


            {
                for (int i = 0; i < ITERATION_COUNT; i++)
                {
                    SchemaTypeLoader loader = XmlBeans.loadXsd(new XmlObject[] { XmlObject.Factory.parse(TestEnv.xbeanCase("schema/XmlSignature/xmldsig-core-schema.xsd")) });
                    XmlObject result = loader.parse(TestEnv.xbeanCase("schema/XmlSignature/signature-example.xml"), null, null);
                    Assert.assertEquals(loader.findDocumentType(new QName("http://www.w3.org/2000/09/xmldsig#", "Signature")), result.schemaType());
                }
                _result = true;
            }
            catch (Throwable t)
            {
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.