code: def check_w3_errors (url_data, xml, w3type):
      
      dom = parseString(xml)
      for error in dom.getElementsByTagName('m:error'):
          warnmsg = _("%(w3type)s validation error at line %(line)s col %(column)s: %(msg)s")
          attrs = {
              "w3type": w3type,
              "line": getXmlText(error, "m:line"),
              "column": getXmlText(error, "m:col"),
              "msg": getXmlText(error, "m:message"),
          }
          url_data.add_warning(warnmsg % attrs)
docs: Add warnings for W3C HTML or CSS errors in xml format.
      w3type is either "W3C HTML" or "W3C CSS".