I need to add text to the <head> tag of HTML documents. I currently have this code in place:
Parser parser = new Parser ("testingHTML.html"); NodeList list = parser.extractAllNodesThatMatch(new NodeClassFilter (HeadTag.class)); HeadTag head=(HeadTag)list.elementAt(0); System.out.println (head.toHtml());
However am stuck at this point and do not know how to proceed. Any help would be greatly appreciated.
Log in to post a comment.
I need to add text to the <head> tag of HTML documents. I currently have this code in place:
Parser parser = new Parser ("testingHTML.html");
NodeList list = parser.extractAllNodesThatMatch(new NodeClassFilter (HeadTag.class));
HeadTag head=(HeadTag)list.elementAt(0);
System.out.println (head.toHtml());
However am stuck at this point and do not know how to proceed. Any help would be greatly appreciated.