Package org.xmlpull.infoset

Examples of org.xmlpull.infoset.XmlDocument


     * @param element
     * @param file
     * @throws IOException
     */
    public static void saveXML(org.xmlpull.infoset.XmlElement element, File file) throws IOException {
        XmlDocument document = BUILDER.newDocument();
        document.setDocumentElement(element);
        String xmlText = BUILDER.serializeToStringPretty(document);
        IOUtil.writeToFile(xmlText, file);
    }
View Full Code Here


     * @return The XmlElement in the document.
     * @throws IOException
     */
    public static org.xmlpull.infoset.XmlElement loadXML(File file) throws IOException {
        String xmlText = IOUtil.readFileToString(file);
        XmlDocument document = BUILDER.parseString(xmlText);
        return document.getDocumentElement();
    }
View Full Code Here

TOP

Related Classes of org.xmlpull.infoset.XmlDocument

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.