protected String getAttributeValue(IDocument document, Node node, String attrName) {
   if (document == null || node == null || attrName == null) return null;
   try {
     Attr attr = (Attr) node.getAttributes().getNamedItem(attrName);
     return Utils.getTrimmedValue(document, attr);
   } catch (BadLocationException x) {
     StrutsExtensionsPlugin.getPluginLog().logError(x);
     return null;
   }
 }