Package org.jdom.output

Examples of org.jdom.output.DOMOutputter


                nsMap.add("xsd", "http://www.w3.org/2001/XMLSchema");
                //For Aegis types, such as org.apache.cxf.aegis.type.basic.StringType
                nsMap.add("ns1", "http://lang.java");
                col.setNamespaceContext(nsMap);

                org.w3c.dom.Document schema = new DOMOutputter().output(new Document(e));

                for (ServiceInfo si : s.getServiceInfos()) {
                    SchemaInfo info = new SchemaInfo(si, entry.getKey());

                    info.setElement(schema.getDocumentElement());
View Full Code Here


        return null;
       
    }
   
    protected void assertXPathEquals(String xpath, String value, Element element) throws Exception {
        org.w3c.dom.Document doc = new DOMOutputter().output(element.getDocument());
        assertXPathEquals(xpath, value, doc);
    }
View Full Code Here

        org.w3c.dom.Document doc = new DOMOutputter().output(element.getDocument());
        assertXPathEquals(xpath, value, doc);
    }
   
    protected void assertValid(String xpath, Element element) throws Exception {
        org.w3c.dom.Document doc = new DOMOutputter().output(element.getDocument());
       
        assertValid(xpath, doc);
    }
View Full Code Here

       
        assertValid(xpath, doc);
    }

    protected void assertInvalid(String xpath, Element element) throws Exception {
        org.w3c.dom.Document doc = new DOMOutputter().output(element.getDocument());
       
        assertInvalid(xpath, doc);
    }
View Full Code Here

        Element root = new Element("root");
        org.jdom.Document wsdl = new org.jdom.Document(root);
        type.writeSchema(root);

        Document doc = new DOMOutputter().output(wsdl);
        addNamespace("xsd", SOAPConstants.XSD);
        assertValid("//xsd:simpleType[@name='test']/xsd:restriction[@base='xsd:string']", doc);
        assertValid("//xsd:restriction[@base='xsd:string']/xsd:enumeration[@value='VALUE1']", doc);
        assertValid("//xsd:restriction[@base='xsd:string']/xsd:enumeration[@value='VALUE2']", doc);
    }
View Full Code Here

                    if (!nsMap.containsValue(n.getURI())) {
                        nsMap.add(n.getPrefix(), n.getURI());
                    }
                }

                org.w3c.dom.Document schema = new DOMOutputter().output(new Document(e));

                for (ServiceInfo si : s.getServiceInfos()) {
                    SchemaCollection col = si.getXmlSchemaCollection();
                    col.setNamespaceContext(nsMap);
                    XmlSchema xmlSchema = addSchemaDocument(si, col, schema, entry.getKey());
View Full Code Here

        writer.close();
    }

    public void testWrite(Document jdoc) throws Exception {
        org.w3c.dom.Document doc = new DOMOutputter().output(jdoc);
        addNamespace("t", "urn:test");
        addNamespace("c", "urn:child1");
        addNamespace("a", "urn:att3");

        assertValid("/t:root/t:nons[text()='nons']", doc);
View Full Code Here

        Element root = new Element("root");
        org.jdom.Document wsdl = new org.jdom.Document(root);
        type.writeSchema(root);

        Document doc = new DOMOutputter().output(wsdl);
        addNamespace("xsd", XmlConstants.XSD);
        assertValid("//xsd:simpleType[@name='test']/xsd:restriction[@base='xsd:string']", doc);
        assertValid("//xsd:restriction[@base='xsd:string']/xsd:enumeration[@value='VALUE1']", doc);
        assertValid("//xsd:restriction[@base='xsd:string']/xsd:enumeration[@value='VALUE2']", doc);
    }
View Full Code Here

        assertValid("/b:root/b:bleh[text()='bleh']", element);
        assertValid("/b:root/b:howdy[text()='howdy']", element);
    }

    private void assertValid(String xpath, Element element) throws Exception {
        org.w3c.dom.Document doc = new DOMOutputter().output(element.getDocument());
       
        assertValid(xpath, doc);
    }
View Full Code Here

       
        assertValid(xpath, doc);
    }

    private void assertInvalid(String xpath, Element element) throws Exception {
        org.w3c.dom.Document doc = new DOMOutputter().output(element.getDocument());
       
        assertInvalid(xpath, doc);
    }
View Full Code Here

TOP

Related Classes of org.jdom.output.DOMOutputter

Copyright © 2018 www.massapicom. 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.