HTMLDocument doc = (HTMLDocument) kit.createDefaultDocument();
doc.putProperty("IgnoreCharsetDirective", Boolean.TRUE);
Reader HTMLReader = new InputStreamReader(url.openConnection().getInputStream());
kit.read(HTMLReader, doc, 0);
// Get an iterator for all HTML tags.
ElementIterator it = new ElementIterator(doc);
Element elem;
while( (elem = it.next()) != null )
{
if( elem.getName().equals( "img") )
{
String s = (String) elem.getAttributes().getAttribute(HTML.Attribute.SRC);
String ww = (String) elem.getAttributes().getAttribute(HTML.Attribute.WIDTH);