// Path: src/java/org/diffxml/diffxml/fmes/Fmes.java
// public class Fmes implements Diff {
// 
//     /**
//      * Determines if the given node should be ignored.
//      *
//      * Examines the node's type against settings.
//      *
//      * @return True if the node is banned, false otherwise
//      * @param  n   The node to be checked
//      */
// 
//     public static boolean isBanned(final Node n) {
//         
//         boolean ret = false;
//         // Check if ignorable whitespace
//         if (DiffFactory.isIgnoreWhitespaceNodes() && DOMOps.isText(n)) {
//             StringTokenizer st = new StringTokenizer(n.getNodeValue());
//             if (!st.hasMoreTokens()) {
//                 ret = true;
//             }
//         }
// 
//         // Check if ignorable comment
//         if (DiffFactory.isIgnoreComments()
//                 && (n.getNodeType() == Node.COMMENT_NODE)) {
//             ret = true;
//         }
// 
//         // Check if ignorable pi
//         if (DiffFactory.isIgnoreProcessingInstructions()
//                 && (n.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE)) {
//             ret = true;
//         }
// 
//         return ret;
//     }
// 
//     /**
//      * Calls fmes diff on two files.
//      *
//      * @return       The delta
//      * @param file1  The original file
//      * @param file2  The modified file
//      * @throws DiffException If something goes wrong during the diff
//      **/
//     public final Document diff(final File file1, final File file2) 
//     throws DiffException {
//         
//         
//         DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance();
//         DOMOps.initParser(fac);
// 
//         DocumentBuilder db = null;
//         Document doc1 = null;
//         Document doc2 = null;
// 
//         try {
//             db = fac.newDocumentBuilder();
//             doc1 = db.parse(file1);
//         } catch (ParserConfigurationException e) {
//             throw new DiffException("Failed to set up XML parser", e);
//         } catch (IOException e) {
//             throw new DiffException("Failed to parse file "
//                     + file1.getAbsolutePath(), e);            
//         } catch (SAXException e) {
//             throw new DiffException("Failed to parse file "
//                     + file1.getAbsolutePath(), e);                        
//         }
// 
//         try {
//             doc2 = db.parse(file2);
//         } catch (IOException e) {
//             throw new DiffException("Failed to parse file "
//                     + file2.getAbsolutePath(), e);            
//         } catch (SAXException e) {
//             throw new DiffException("Failed to parse file "
//                     + file2.getAbsolutePath(), e);                        
//         }
// 
//         return diff(doc1, doc2);
//     }
// 
//     /**
//      * Differences two DOM documents and returns the delta.
//      *
//      * The delta is in DUL format.
//      *
//      * @param doc1    The original document
//      * @param doc2    The new document
//      *
//      * @return        A document describing the changes
//      *                required to make doc1 into doc2.
//      * @throws DiffException If something goes wrong during the diff
//      */
// 
//     public final Document diff(final Document doc1, final Document doc2) 
//     throws DiffException  {
// 
//         NodePairs matchings = Match.easyMatch(doc1, doc2);
// 
//         Document delta = null;
//         try {
//             delta = (new EditScript(doc1, doc2, matchings)).create();
//         } catch (DocumentCreationException e) {
//             throw new DiffException("Failed to create Edit Script ", e); 
//         }
// 
//         return delta;
//     }
// }


import org.diffxml.diffxml.fmes.Fmes;
        return mDUL;
    }

    /**
     * Sets whether external entities should be resolved.
     * 
     * @param resolve If true, external entities are resolved.
     */
    public static void setResolveEntities(final boolean resolve) {
        mResolveEntities = resolve;
    }
    
    /**
     * Gets whether external entities should be resolved.
     * 
     * @return True if external entities are resolved.
     */
    public static boolean isResolveEntities() {
        return mResolveEntities;
    }
    
    /**
     * Creates an instance of the appropriate Diff engine.
     * 
     * Currently only FMES, may be more in future.
     * 
     * @return a difference engine meeting implementing the Diff interface
     */
    public static Diff createDiff() {
        
// Path: src/java/org/diffxml/diffxml/fmes/Fmes.java
// public class Fmes implements Diff {
// 
//     /**
//      * Determines if the given node should be ignored.
//      *
//      * Examines the node's type against settings.
//      *
//      * @return True if the node is banned, false otherwise
//      * @param  n   The node to be checked
//      */
// 
//     public static boolean isBanned(final Node n) {
//         
//         boolean ret = false;
//         // Check if ignorable whitespace
//         if (DiffFactory.isIgnoreWhitespaceNodes() && DOMOps.isText(n)) {
//             StringTokenizer st = new StringTokenizer(n.getNodeValue());
//             if (!st.hasMoreTokens()) {
//                 ret = true;
//             }
//         }
// 
//         // Check if ignorable comment
//         if (DiffFactory.isIgnoreComments()
//                 && (n.getNodeType() == Node.COMMENT_NODE)) {
//             ret = true;
//         }
// 
//         // Check if ignorable pi
//         if (DiffFactory.isIgnoreProcessingInstructions()
//                 && (n.getNodeType() == Node.PROCESSING_INSTRUCTION_NODE)) {
//             ret = true;
//         }
// 
//         return ret;
//     }
// 
//     /**
//      * Calls fmes diff on two files.
//      *
//      * @return       The delta
//      * @param file1  The original file
//      * @param file2  The modified file
//      * @throws DiffException If something goes wrong during the diff
//      **/
//     public final Document diff(final File file1, final File file2) 
//     throws DiffException {
//         
//         
//         DocumentBuilderFactory fac = DocumentBuilderFactory.newInstance();
//         DOMOps.initParser(fac);
// 
//         DocumentBuilder db = null;
//         Document doc1 = null;
//         Document doc2 = null;
// 
//         try {
//             db = fac.newDocumentBuilder();
//             doc1 = db.parse(file1);
//         } catch (ParserConfigurationException e) {
//             throw new DiffException("Failed to set up XML parser", e);
//         } catch (IOException e) {
//             throw new DiffException("Failed to parse file "
//                     + file1.getAbsolutePath(), e);            
//         } catch (SAXException e) {
//             throw new DiffException("Failed to parse file "
//                     + file1.getAbsolutePath(), e);                        
//         }
// 
//         try {
//             doc2 = db.parse(file2);
//         } catch (IOException e) {
//             throw new DiffException("Failed to parse file "
//                     + file2.getAbsolutePath(), e);            
//         } catch (SAXException e) {
//             throw new DiffException("Failed to parse file "
//                     + file2.getAbsolutePath(), e);                        
//         }
// 
//         return diff(doc1, doc2);
//     }
// 
//     /**
//      * Differences two DOM documents and returns the delta.
//      *
//      * The delta is in DUL format.
//      *
//      * @param doc1    The original document
//      * @param doc2    The new document
//      *
//      * @return        A document describing the changes
//      *                required to make doc1 into doc2.
//      * @throws DiffException If something goes wrong during the diff
//      */
// 
//     public final Document diff(final Document doc1, final Document doc2) 
//     throws DiffException  {
// 
//         NodePairs matchings = Match.easyMatch(doc1, doc2);
// 
//         Document delta = null;
//         try {
//             delta = (new EditScript(doc1, doc2, matchings)).create();
//         } catch (DocumentCreationException e) {
//             throw new DiffException("Failed to create Edit Script ", e); 
//         }
// 
//         return delta;
//     }
// }


// Path: src/java/org/diffxml/diffxml/DiffFactory.java
import org.diffxml.diffxml.fmes.Fmes;

        return mDUL;
    }

    /**
     * Sets whether external entities should be resolved.
     * 
     * @param resolve If true, external entities are resolved.
     */
    public static void setResolveEntities(final boolean resolve) {
        mResolveEntities = resolve;
    }
    
    /**
     * Gets whether external entities should be resolved.
     * 
     * @return True if external entities are resolved.
     */
    public static boolean isResolveEntities() {
        return mResolveEntities;
    }
    
    /**
     * Creates an instance of the appropriate Diff engine.
     * 
     * Currently only FMES, may be more in future.
     * 
     * @return a difference engine meeting implementing the Diff interface
     */
    public static Diff createDiff() {
        
        return new Fmes();