code: public static boolean checkCommentNodes(Node node, String str) {
  
          // Get nodes of node and go through them
          NodeList children = node.getChildNodes();
          for (int i = 0; i < children.getLength(); i++) {
              Node child = children.item(i);
              NodeList childChildren = child.getChildNodes();
              if (childChildren.getLength() > 0) {
                  // Recurse for all children
                  boolean okDownThere = checkCommentNodes(child, str);
                  if (okDownThere == true) {
                      return true;
                  }
              }
              // Investigate comments
              if (child.getNodeType() == Node.COMMENT_NODE) {
                  // If we got a comment that contains the string we are happy
                  Comment comment = (Comment) child;
                  if (comment.getNodeValue().contains(str)) {
                      return true;
                  }
              }
          }
          return false;
      }
docs: Determines if there is a comment Node that contains the given string.
  
  @param node
  the Node to look in
  @param str
  the string value to match in the comment nodes
  
  CTL declaration, if we ever want to use it <!--Sample Usage:
  ctl:checkCommentNodes($xml.resp, 'complexContent')-->
  <ctl:function name="ctl:checkCommentNodes"> <ctl:param
  name="node"/> <ctl:param name="string"/>
  <ctl:description>Checks a Node for comments that contain the
  given string.</ctl:description> <ctl:java
  class="com.occamlab.te.util.DomUtils"
  method="checkCommentNodes"/> </ctl:function>
  
  @return the original Document with the update attribute nodes