Examples of IHTMLParseResult


Examples of com.subgraph.vega.api.html.IHTMLParseResult

import com.subgraph.vega.api.util.VegaURI;

public class HtmlUrlExtractor {
 
  List<VegaURI> findHtmlUrls(IHttpResponse response) {
    final IHTMLParseResult htmlParseResult = response.getParsedHTML();
   
    if(htmlParseResult != null) {
      return extractUrlsFromDocument(htmlParseResult.getJsoupDocument());
    } else {
      return Collections.emptyList();
    }
  }
View Full Code Here

Examples of com.subgraph.vega.api.html.IHTMLParseResult

    this.uriFilter = uriFilter;
    this.uriParser = uriParser;
  }

  public void processForms(IInjectionModuleContext ctx, HttpUriRequest request, IHttpResponse response) {
    final IHTMLParseResult html = response.getParsedHTML();
    if(html == null)
      return;

    final HTMLDocument document = html.getDOMDocument();
    final HTMLCollection forms = document.getForms();

    for(int i = 0; i < forms.getLength(); i++) {
      Node n = forms.item(i);
      if(n instanceof Element) {
View Full Code Here

Examples of com.subgraph.vega.api.html.IHTMLParseResult

    }
    sqlDetector.detectErrorMessages(ctx, req, res);
  }

  private void analyzeHtml(IInjectionModuleContext ctx, HttpUriRequest req, IHttpResponse res) {
    IHTMLParseResult html = res.getParsedHTML();
    if(html == null)
      return;
    HTMLDocument document = html.getDOMDocument();
    NodeList elements = document.getElementsByTagName("*");
    for(int i = 0; i < elements.getLength(); i++) {
      Node node = elements.item(i);
      if(node instanceof Element) {
        analyzeHtmlElement(ctx, req, res, (Element) node);
View Full Code Here

Examples of com.subgraph.vega.api.html.IHTMLParseResult

    this.response = (IHttpResponse) Context.jsToJava(response, IHttpResponse.class);
  }
 
 
  private Scriptable createCachedDocument() {
    final IHTMLParseResult htmlResult = response.getParsedHTML();
    if(htmlResult == null) {
      return null;
    }
    final Context cx = Context.getCurrentContext();
    final HTMLDocument domDocument = htmlResult.getDOMDocument();
    final Scriptable scope = ScriptableObject.getTopLevelScope(this);
    final Object docOb = Context.javaToJS(domDocument, scope);
    final Object[] args = { docOb };
    return cx.newObject(scope, "HTMLDocument", args);
  }
View Full Code Here

Examples of com.subgraph.vega.api.html.IHTMLParseResult

    this.htmlParser = parser;
  }
 
  public void run(IWorkspace workspace) throws IOException {
    String html = lookupModuleString("html");
    IHTMLParseResult parseResult = loadHTML(html);
    final List<ExportedObject> exports = new ArrayList<ExportedObject>();
    export(exports, "testDom", parseResult.getDOMDocument());
    export(exports, "workspace", workspace);
    runScript(exports, "domtest");
   
  }
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.