/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package Parser; import testapp.data.ExternalJavascriptItem; import testapp.data.Item; import java.util.logging.*; public class JavascriptParser { private Item rootNode; private static final Logger logger = Logger.getLogger(JavascriptParser.class.getName()); public JavascriptParser(Item rootNode) { this.rootNode=rootNode; } public ExternalJavascriptItem parse(String url) { // Todo: http client to recieve url and put contents into code String code=new String(); return parseCode(code, url); } public ExternalJavascriptItem parseCode(String code, String url) { // the only evil js code should be //document.write('