{
  static final String getAttribute(NamedNodeMap attrs, String name)  {    Node attr = attrs.getNamedItem(name);    if (attr == null)      {        return null;      }    String ret = attr.getNodeValue();    if (ret.length() == 0)      {        return null;      }    return ret;  }