public String toString() {
    try {
      Node domNode = (Node)getUserObject();
      String domNodeValue = getNodeValue(domNode);

      if(_displayNodeValue && (domNodeValue != null) && (!domNodeValue.trim().equals(""))) {
        if(domNode instanceof Attr) {
          return ((Attr)domNode).getName() + ": " + domNodeValue;
        }
        else {
          return domNode.getNodeName() + ": " + domNodeValue;
        }
      }
      else {
        return domNode.getNodeName();
      }
    }
    catch(Exception e) {
      return super.toString();
    }
  }