/** @see com.itextpdf.text.xml.simpleparser.SimpleXMLDocHandler#endElement(java.lang.String) */
 public void endElement(final String tag) {
   HTMLTagProcessor htmlTag = tags.get(tag);
   if (htmlTag == null) {
     return;
   }
   // process the tag
   try {
     htmlTag.endElement(this, tag);
   } catch (DocumentException e) {
     throw new ExceptionConverter(e);
   }
 }
 /**
  * @see com.itextpdf.text.xml.simpleparser.SimpleXMLDocHandler#startElement(java.lang.String,
  *     java.util.Map)
  */
 public void startElement(final String tag, final Map<String, String> attrs) {
   HTMLTagProcessor htmlTag = tags.get(tag);
   if (htmlTag == null) {
     return;
   }
   // apply the styles to attrs
   style.applyStyle(tag, attrs);
   // deal with the style attribute
   StyleSheet.resolveStyleAttribute(attrs, chain);
   // process the tag
   try {
     htmlTag.startElement(this, tag, attrs);
   } catch (DocumentException e) {
     throw new ExceptionConverter(e);
   } catch (IOException e) {
     throw new ExceptionConverter(e);
   }
 }