*/
public String getHtmlMeta(String input) throws YadisException
{
String xrdsLocation = null;
HTMLDocumentImpl doc = this.parseDocument(input);
if (DEBUG)
{
try
{
_log.debug("document:\n" + OpenID4JavaDOMParser.toXmlString(doc));
} catch (TransformerException e)
{
_log.debug("An exception occurs while transforming the document to string in debugging.", e);
}
}
NodeList heads = doc.getElementsByTagName("head");
if (heads.getLength() != 1)
throw new YadisException(
"HTML response must have exactly one HEAD element, "
+ "found " + heads.getLength() + " : "
+ heads.toString(),
OpenIDException.YADIS_HTMLMETA_INVALID_RESPONSE);
HTMLHeadElement head = (HTMLHeadElement) doc.getHead();
NodeList metaElements = head.getElementsByTagName("META");
if (metaElements == null || metaElements.getLength() == 0)
{
if (DEBUG)
_log.debug("No <meta> element found under <html><head>. " +