Package org.jdom.output

Examples of org.jdom.output.XMLOutputter.outputString()


            QueryProcessor qp = new QueryProcessor(configuration, staticQueryContext);
            XQueryExpression xQueryExpression = qp.compileQuery(query);
            //if SAXON worked with JDOM directly (like it claims to) we could replace the next with:
            ///DocumentInfo saxonDocInfo = qp.buildDocument(new DocumentWrapper(_parentDecomposition.getInternalDataDocument(), null));
            DocumentInfo saxonDocInfo = qp.buildDocument(new StreamSource(
                    new StringReader(outputter.outputString(element))));
            DynamicQueryContext dynamicQueryContext = new DynamicQueryContext();
            dynamicQueryContext.setContextNode(saxonDocInfo);
            List nodeList = xQueryExpression.evaluate(dynamicQueryContext);
            //my code to parse SAXON resulting XML tree and produce a string
            //because saxons QueryResult class isn't yet able to produce the desired string from anything
View Full Code Here


                                "Schema for completing task"),
                        BorderFactory.createEmptyBorder(10, 10, 10, 10)));
        JTextPane schemaTextPane = new JTextPane();
        schemaTextPane.setContentType("text/xml");
        schemaTextPane.setFont(new Font("courier", Font.PLAIN, 12));
        String schemaXML = xmlOut.outputString(exception.getSchema());

        /**
         * AJH: Trap various XML format errors gracefully.
         */
        try
View Full Code Here

                                BorderFactory.createEtchedBorder(), "The data that failed to validate"),
                        BorderFactory.createEmptyBorder(10, 10, 10, 10)));
        JTextPane dataTextPane = new JTextPane();
        dataTextPane.setContentType("text/xml");
        dataTextPane.setFont(new Font("courier", Font.PLAIN, 12));
        String data = xmlOut.outputString(exception.get_dataInput());

        /**
         * AJH: Trap various XML format errors gracefully.
         */
        try
View Full Code Here

    public static void validateDataAgainstTypes(String schema, Element rawDecompositionData, String source)
            throws YDataStateException {
        XMLValidator validator = new XMLValidator();
        XMLOutputter output = new XMLOutputter(Format.getPrettyFormat());

        String dataInput = output.outputString(rawDecompositionData);

        String errors = validator.checkSchema(
                schema,
                dataInput);
View Full Code Here

                XMLOutputter out = new XMLOutputter(Format.getCompactFormat());

                while (yawlServiceIter.hasNext()) {
                    Element yawlServiceElem = (Element) yawlServiceIter.next();
                    YAWLServiceReference service =
                            YAWLServiceReference.unmarshal(out.outputString(yawlServiceElem));
                    yawlServices.add(service);
                }
            }
        } catch (JDOMException e) {
            e.printStackTrace();
View Full Code Here

            paramElem.addContent(0, orderingElem);
        } else {
            paramElem.addContent(1, orderingElem);
        }
        XMLOutputter outputter = new XMLOutputter(Format.getCompactFormat());
        return outputter.outputString(paramElem);
    }

    public String toString() {
        return toXML();
    }
View Full Code Here


    public String getDataString() {
        if (_dataList != null) {
            XMLOutputter outputter = new XMLOutputter(Format.getPrettyFormat());
            return outputter.outputString(_dataList);
        }
        return null;
    }

View Full Code Here

        Namespace schema2SchNS = Namespace.getNamespace("http://www.w3.org/2001/XMLSchema");
        Element schemaLibraryElement = yawlSpecElement.getChild("schema", schema2SchNS);

        if (schemaLibraryElement != null) {
            XMLOutputter output = new XMLOutputter();
            return output.outputString(schemaLibraryElement);
        }
        return null;
    }

    public static void main(String args[]) throws Exception {
View Full Code Here

        return el;
    }

    public String getString() {
        XMLOutputter outPutter = new XMLOutputter();
        return outPutter.outputString(_doc.getRootElement());
    }
}
View Full Code Here

        SAXBuilder builder = new SAXBuilder();
        Document finalDoc = null;

        finalDoc = builder.build(new StringReader(xml.toString()));
        XMLOutputter out = new XMLOutputter(Format.getPrettyFormat());
        return out.outputString(finalDoc);

    }


    public static String marshal(YSpecification specification) throws IOException, JDOMException {
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.