Examples of parseHTML()


Examples of net.sf.jpluck.spider.Resource.parseHTML()

      in.read(data);
      in.close();
    }
    System.out.println("Parsing HTML");
    Resource resource = new Resource(html, null, new ContentType("text/html"), data, 0, false);
    Document document = resource.parseHTML();
    Transformer transformer = TransformerFactory.newInstance().newTransformer();
    File file = new File(xml);
    System.out.println("Writing " + file.getAbsolutePath());
    transformer.setOutputProperty(OutputKeys.METHOD, "xml");
    transformer.setOutputProperty(OutputKeys.ENCODING, encoding);
View Full Code Here

Examples of net.sf.jpluck.spider.Resource.parseHTML()

        }
        byte[] data = baos.toByteArray();
        Document document = new Document();
        if (mimeType.equals("text/html")) {
      Resource resource = new Resource("http://127.0.0.1/", null, new ContentType(mimeType), data, 0, false);
      org.w3c.dom.Document dom = resource.parseHTML();
      TextRecord textRecord = new TextRecord("http://127.0.0.1/");
      Transformer transformer = TransformerFactory.newInstance().newTransformer();
      TextRecordResult result = new TextRecordResult(textRecord, new URIRewriter(), 100, false, document);
      transformer.transform(new DOMSource(dom), result);
      document.addRecord(textRecord);
View Full Code Here

Examples of org.ajax4jsf.webapp.HtmlParser.parseHtml()

          .get(AjaxContext.HEAD_EVENTS_PARAMETER);
        htmlParser.setHeadNodes(headEvents);
        htmlParser.setDoctype(getPublicid());
        htmlParser.setViewState((String) context.getExternalContext().getRequestMap()
            .get(AjaxViewHandler.SERIALIZED_STATE_KEY));
        htmlParser.parseHtml(reader, response.getWriter());
        } finally {
          reuseParser(htmlParser);
        }
      }
      // TODO - code for output stream.
View Full Code Here

Examples of org.jamwiki.parser.AbstractParser.parseHTML()

      sb.append("<div style=\"min-height:"+ wikiComp.getMinHeight() +"px\" id=\"");
      sb.append(uniqueId);
      sb.append("\">");
   
      AbstractParser parser = new JFlexParser(input);
      parsedDoc = parser.parseHTML(wikiComp.getWikiContent());
    } catch (UnsupportedEncodingException e) {
      //encoding utf-8 should be ok
    } catch (Exception e) {
      throw new OLATRuntimeException(this.getClass(), "error while rendering wiki page with content:"+ wikiComp.getWikiContent(), e);
    }
View Full Code Here

Examples of org.jamwiki.parser.AbstractParser.parseHTML()

      input.setUserIpAddress("0.0.0.0");
      input.setDataHandler(DUMMY_DATA_HANDLER);
      input.setVirtualWiki("/olat");

      AbstractParser parser = new JFlexParser(input);
      ParserDocument parsedDoc = parser.parseHTML(wikiPage.getContent());
      String parsedContent = parsedDoc.getContent();
      String filteredContent = FilterFactory.getHtmlTagAndDescapingFilter().filter(parsedContent);
      return filteredContent;
    } catch(Exception e) {
      e.printStackTrace();
View Full Code Here

Examples of org.jamwiki.parser.jflex.JFlexParser.parseHTML()

      sb.append("<div style=\"min-height:"+ wikiComp.getMinHeight() +"px\" id=\"");
      sb.append(uniqueId);
      sb.append("\">");
   
      AbstractParser parser = new JFlexParser(input);
      parsedDoc = parser.parseHTML(wikiComp.getWikiContent());
    } catch (UnsupportedEncodingException e) {
      //encoding utf-8 should be ok
    } catch (Exception e) {
      throw new OLATRuntimeException(this.getClass(), "error while rendering wiki page with content:"+ wikiComp.getWikiContent(), e);
    }
View Full Code Here

Examples of org.jamwiki.parser.jflex.JFlexParser.parseHTML()

      input.setUserIpAddress("0.0.0.0");
      input.setDataHandler(DUMMY_DATA_HANDLER);
      input.setVirtualWiki("/olat");

      AbstractParser parser = new JFlexParser(input);
      ParserDocument parsedDoc = parser.parseHTML(wikiPage.getContent());
      String parsedContent = parsedDoc.getContent();
      String filteredContent = FilterFactory.getHtmlTagAndDescapingFilter().filter(parsedContent);
      return filteredContent;
    } catch(Exception e) {
      e.printStackTrace();
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.