Package org.outerj.daisy.diff.html.dom

Examples of org.outerj.daisy.diff.html.dom.DomTreeBuilder


            final HtmlCleaner cleaner = new HtmlCleaner();

            final InputSource oldSource = new InputSource(new StringReader(original));
            final InputSource newSource = new InputSource(new StringReader(amendment));

            final DomTreeBuilder oldHandler = new DomTreeBuilder();
            cleaner.cleanAndParse(oldSource, oldHandler);

            final TextNodeComparator leftComparator = new TextNodeComparator(oldHandler, locale);

            final DomTreeBuilder newHandler = new DomTreeBuilder();
            cleaner.cleanAndParse(newSource, newHandler);

            final TextNodeComparator rightComparator = new TextNodeComparator(newHandler, locale);

            postProcess.startDocument();
View Full Code Here


    NekoHtmlParser cleaner = new NekoHtmlParser();

    InputSource oldSource = new InputSource(new StringReader(first));
    InputSource newSource = new InputSource(new StringReader(second));

    DomTreeBuilder oldHandler = new DomTreeBuilder();
    cleaner.parse(oldSource, oldHandler);
    TextNodeComparator leftComparator = new TextNodeComparator(oldHandler,
        locale);

    DomTreeBuilder newHandler = new DomTreeBuilder();
    cleaner.parse(newSource, newHandler);
    TextNodeComparator rightComparator = new TextNodeComparator(newHandler,
        locale);

    HtmlSaxDiffOutput output = new HtmlSaxDiffOutput(postProcess, prefix);
View Full Code Here

      InputSource oldSource = new InputSource(new ByteArrayInputStream(
          left.getBytes()));
      InputSource newSource = new InputSource(new ByteArrayInputStream(
          right.getBytes()));

      DomTreeBuilder oldHandler = new DomTreeBuilder();
      cleaner.cleanAndParse(oldSource, oldHandler);

      TextNodeComparator leftComparator = new TextNodeComparator(
          oldHandler, locale);

      DomTreeBuilder newHandler = new DomTreeBuilder();
      cleaner.cleanAndParse(newSource, newHandler);

      TextNodeComparator rightComparator = new TextNodeComparator(
          newHandler, locale);
View Full Code Here

   */
  public static void diffHTML(InputSource oldSource, InputSource newSource,
      ContentHandler consumer, String prefix, Locale locale)
      throws SAXException, IOException {

    DomTreeBuilder oldHandler = new DomTreeBuilder();
    XMLReader xr1 = XMLReaderFactory.createXMLReader();
    xr1.setContentHandler(oldHandler);
    xr1.parse(oldSource);
    TextNodeComparator leftComparator = new TextNodeComparator(oldHandler,
        locale);

    DomTreeBuilder newHandler = new DomTreeBuilder();
    XMLReader xr2 = XMLReaderFactory.createXMLReader();
    xr2.setContentHandler(newHandler);
    xr2.parse(newSource);

    TextNodeComparator rightComparator = new TextNodeComparator(newHandler,
View Full Code Here

      InputSource oldSource = new InputSource(new ByteArrayInputStream(
          left.getBytes()));
      InputSource newSource = new InputSource(new ByteArrayInputStream(
          right.getBytes()));

      DomTreeBuilder ancestorHandler = new DomTreeBuilder();
      cleaner.cleanAndParse(ancestorSource, ancestorHandler);
      TextNodeComparator ancestorComparator = new TextNodeComparator(
          ancestorHandler, locale, true);

      DomTreeBuilder oldHandler = new DomTreeBuilder();
      cleaner.cleanAndParse(oldSource, oldHandler);
      TextNodeComparator leftComparator = new TextNodeComparator(
          oldHandler, locale, true);

      DomTreeBuilder newHandler = new DomTreeBuilder();
      cleaner.cleanAndParse(newSource, newHandler);
      TextNodeComparator rightComparator = new TextNodeComparator(
          newHandler, locale, true);

      postProcess.startDocument();
View Full Code Here

      InputSource oldSource = new InputSource(new ByteArrayInputStream(
          left.getBytes()));
      InputSource newSource = new InputSource(new ByteArrayInputStream(
          right.getBytes()));

      DomTreeBuilder oldHandler = new DomTreeBuilder();
      cleaner.cleanAndParse(oldSource, oldHandler);

      TextNodeComparator leftComparator = new TextNodeComparator(
          oldHandler, locale);

      DomTreeBuilder newHandler = new DomTreeBuilder();
      cleaner.cleanAndParse(newSource, newHandler);

      TextNodeComparator rightComparator = new TextNodeComparator(
          newHandler, locale);
View Full Code Here

      InputSource oldSource = new InputSource(new ByteArrayInputStream(
          left.getBytes()));
      InputSource newSource = new InputSource(new ByteArrayInputStream(
          right.getBytes()));

      DomTreeBuilder ancestorHandler = new DomTreeBuilder();
      cleaner.cleanAndParse(ancestorSource, ancestorHandler);
      TextNodeComparator ancestorComparator = new TextNodeComparator(
          ancestorHandler, locale, true);

      DomTreeBuilder oldHandler = new DomTreeBuilder();
      cleaner.cleanAndParse(oldSource, oldHandler);
      TextNodeComparator leftComparator = new TextNodeComparator(
          oldHandler, locale, true);

      DomTreeBuilder newHandler = new DomTreeBuilder();
      cleaner.cleanAndParse(newSource, newHandler);
      TextNodeComparator rightComparator = new TextNodeComparator(
          newHandler, locale, true);

      postProcess.startDocument();
View Full Code Here

        HtmlCleaner cleaner = new HtmlCleaner();

        InputSource oldSource = new InputSource(oldStream);
        InputSource newSource = new InputSource(newStream);

        DomTreeBuilder oldHandler = new DomTreeBuilder();
        cleaner.cleanAndParse(oldSource, oldHandler);
        if (!quietMode)
          System.out.print(".");
        TextNodeComparator leftComparator = new TextNodeComparator(
            oldHandler, locale);

        DomTreeBuilder newHandler = new DomTreeBuilder();
        cleaner.cleanAndParse(newSource, newHandler);
        if (!quietMode)
          System.out.print(".");
        TextNodeComparator rightComparator = new TextNodeComparator(
            newHandler, locale);
View Full Code Here

TOP

Related Classes of org.outerj.daisy.diff.html.dom.DomTreeBuilder

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.