Esempio n. 1
0
 private static String getMetaValue(Source source, String key) {
   for (int pos = 0; pos < source.length(); ) {
     StartTag startTag = source.getNextStartTag(pos, "name", key, false);
     if (startTag == null) return null;
     if (startTag.getName() == HTMLElementName.META)
       return startTag.getAttributeValue("content"); // Attribute values are automatically decoded
     pos = startTag.getEnd();
   }
   return null;
 }