Examples of createDocument()


Examples of org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument()

                (XMLResourceDescriptor.getXMLParserClassName());
            String uri = ((SVGOMDocument)bridgeContext.getDocument()).
                getURLObject().toString();
            DocumentFragment result = null;
            try {
                Document d = df.createDocument(uri, new StringReader(text));
                result = doc.createDocumentFragment();
                result.appendChild(doc.importNode(d.getDocumentElement(),
                                                  true));
            } catch (Exception ex) {
                StringBuffer sb = new StringBuffer(text.length() +
View Full Code Here

Examples of org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument()

                sb.append(FRAGMENT_PREFIX);
                sb.append(text);
                sb.append("</svg>");
                String newText = sb.toString();
                try {
                    Document d = df.createDocument
                        (uri, new StringReader(newText));
                    for (Node n = d.getDocumentElement().getFirstChild();
                         n != null;
                         n = n.getNextSibling()) {
                        if (n.getNodeType() == n.ELEMENT_NODE) {
View Full Code Here

Examples of org.apache.batik.dom.svg.SVGDOMImplementation.createDocument()

* @author <a href="mailto:vincent.hardy@sun.com">Vincent Hardy</a>
*/
public class DOMUtilitiesCharacterEscaping extends AbstractTest {
    public TestReport runImpl() throws Exception {
        DOMImplementation impl = new SVGDOMImplementation();
        Document doc = impl.createDocument(SVGConstants.SVG_NAMESPACE_URI,
                                           "svg", null);

        Element svg = doc.getDocumentElement();
        Element text = doc.createElementNS(SVGConstants.SVG_NAMESPACE_URI,
                                           "text");
View Full Code Here

Examples of org.apache.batik.dom.svg.SVGDocumentFactory.createDocument()

     */
    public void transcodeToStream(InputSource isource, OutputStream ostream)
            throws TranscoderException {
        SVGDocumentFactory f = new SVGDocumentFactory(getParserClassName());
        try {
            transcodeToStream(f.createDocument(isource.getSystemId(),
                                               isource), ostream);
        } catch (DOMException ex) {
            throw new TranscoderException(ex.getMessage(), ex);
        } catch (SAXException ex) {
            throw new TranscoderException(ex.getMessage(), ex);
View Full Code Here

Examples of org.apache.batik.dom.util.DocumentFactory.createDocument()

            BufferedReader r;
            r = new BufferedReader(new InputStreamReader(is, PREFERENCE_ENCODING));
            DocumentFactory df = new SAXDocumentFactory
                (GenericDOMImplementation.getDOMImplementation(),
                 xmlParserClassName);
            Document doc = df.createDocument("http://xml.apache.org/batik/preferences",
                                             "preferences",
                                             null,
                                             r);
            Element elt = doc.getDocumentElement();
            for (Node n = elt.getFirstChild(); n != null; n = n.getNextSibling()) {
View Full Code Here

Examples of org.apache.batik.dom.util.SAXDocumentFactory.createDocument()

                } catch (Exception exc) {
                    SAXDocumentFactory sdf = new SAXDocumentFactory
                        (doc.getImplementation(),
                         XMLResourceDescriptor.getXMLParserClassName());
                    try {
                        Document d = sdf.createDocument
                            (uri, new StringReader(text));
                        result = doc.createDocumentFragment();
                        result.appendChild(doc.importNode(d.getDocumentElement(), true));
                    } catch (Exception ext) {
                        if (userAgent != null)
View Full Code Here

Examples of org.apache.batik.dom.util.SAXDocumentFactory.createDocument()

            BufferedReader r;
            r = new BufferedReader(new InputStreamReader(is, PREFERENCE_ENCODING));
            DocumentFactory df = new SAXDocumentFactory
                (GenericDOMImplementation.getDOMImplementation(),
                 xmlParserClassName);
            Document doc = df.createDocument("http://xml.apache.org/batik/preferences",
                                             "preferences",
                                             null,
                                             r);
            Element elt = doc.getDocumentElement();
            for (Node n = elt.getFirstChild(); n != null; n = n.getNextSibling()) {
View Full Code Here

Examples of org.apache.batik.dom.util.SAXDocumentFactory.createDocument()

                } catch (Exception exc) {
                    SAXDocumentFactory sdf = new SAXDocumentFactory
                        (doc.getImplementation(),
                         XMLResourceDescriptor.getXMLParserClassName());
                    try {
                        Document d = sdf.createDocument
                            (uri, new StringReader(text));
                        result = doc.createDocumentFragment();
                        result.appendChild(doc.importNode(d.getDocumentElement(), true));
                    } catch (Exception ext) {
                        if (userAgent != null)
View Full Code Here

Examples of org.apache.camel.converter.jaxp.XmlConverter.createDocument()

    public void marshalRoutesUsingJaxb(String fileName, List<RouteType> routeTypes) throws IOException {
        OutputStream outputStream = outputStream(fileName);

        try {
            XmlConverter converter = converter();
            Document doc = converter.createDocument();

            Element root = doc.createElement(rootElementName());
            root.setAttribute("xmlns", Namespaces.DEFAULT_NAMESPACE);
            doc.appendChild(root);
View Full Code Here

Examples of org.apache.chemistry.opencmis.client.api.Folder.createDocument()

                addResult(createResult(SKIPPED, "Test type is not versionable. Test skipped!"));
                return;
            }

            // major version
            Document docMajor = testFolder.createDocument(getProperties("major.txt"), getContentStream(),
                    VersioningState.MAJOR);
            addResult(checkObject(session, docMajor, getAllProperties(docMajor), "Major version compliance"));

            f = createResult(FAILURE, "Document should be major version.");
            addResult(assertIsTrue(docMajor.isMajorVersion(), null, f));
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.