org.w3c.dom.html.HTMLLinkElement Java Examples
The following examples show how to use
org.w3c.dom.html.HTMLLinkElement.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CyberNekoDOMHtmlParser.java From openid4java with Apache License 2.0 | 5 votes |
public void parseHtml(String htmlData, HtmlResult result) throws DiscoveryException { if (DEBUG) _log.debug("Parsing HTML data:\n" + htmlData); HTMLDocumentImpl doc = this.parseDocument(htmlData); NodeList heads = doc.getElementsByTagName("head"); if (heads.getLength() != 1) throw new DiscoveryException( "HTML response must have exactly one HEAD element, " + "found " + heads.getLength() + " : " + heads.toString(), OpenIDException.DISCOVERY_HTML_PARSE_ERROR); HTMLHeadElement head = (HTMLHeadElement) doc.getHead(); NodeList linkElements = head.getElementsByTagName("LINK"); for (int i = 0, len = linkElements.getLength(); i < len; i++) { HTMLLinkElement linkElement = (HTMLLinkElement) linkElements.item(i); setResult(linkElement.getRel(), linkElement.getHref(), result); } if (DEBUG) _log.debug("HTML discovery result:\n" + result); }
Example #2
Source File: HtmlRendererContextImpl.java From LoboBrowser with MIT License | 4 votes |
public boolean isVisitedLink(final HTMLLinkElement link) { // TODO return false; }