Package cx.fbn.nevernote.xml

Examples of cx.fbn.nevernote.xml.XMLCleanup


    }
   
    // Second pass through the data.  The goal of this pass is to
    // remove any things we added in NixNote that do not match
    // the ENML schema
    XMLCleanup v = new XMLCleanup();
    v.setValue(newContent);
    logger.log(logger.HIGH, "Beginning ENML Cleanup");
    v.validate();
    logger.log(logger.HIGH, "Cleanup complete.");
   
 
     
    // Final pass through the data.  In this one we
    // remove any invalid attributes and to save the
    // new resources.
    logger.log(logger.EXTREME, "Rebuilt ENML:");
    logger.log(logger.EXTREME, v.getValue())
    logger.log(logger.EXTREME, "End Of Rebuilt ENML:");
    resources = v.getResources();

   
    // The XML has the dtd to validate set against Evernote's web
    // address.  We change it to a local one because otherwise it would
    // fail if the user doesn't have internet connectivity.  The local copy
    // also contains the 3 other PUBLIC definitions at the beginning of the dtd.
    newContent = v.getValue();
    File dtdFile = Global.getFileManager().getXMLDirFile("enml2.dtd");
    String dtd = dtdFile.toURI().toString();
    newContent = newContent.replace("<!DOCTYPE en-note SYSTEM \'http://xml.evernote.com/pub/enml2.dtd'>",
        "<!DOCTYPE en-note SYSTEM \"" +dtd +"\">");
   
View Full Code Here

TOP

Related Classes of cx.fbn.nevernote.xml.XMLCleanup

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.