code: private void genSearchString(StringBuffer searchExpBuffer, LogicalNode logicalNode) throws WIMException {
          boolean write = false;
  
          if (logOps.isEmpty()) {
              write = true;
              logOps.push(logicalNode.getOperator());
          } else if ((logOps.peek()) != logicalNode.getOperator()) {
              write = true;
              logOps.push(logicalNode.getOperator());
          }
  
          if (write) {
              if (logicalNode.getOperator().equals(XPathLogicalNode.OP_AND)) {
  
                  searchExpBuffer.append("(&");
              } else {
                  searchExpBuffer.append("(|");
              }
          }
  
          genStringChild(searchExpBuffer, (XPathNode) logicalNode.getLeftChild());
          genStringChild(searchExpBuffer, (XPathNode) logicalNode.getRightChild());
  
          if (write) {
              searchExpBuffer.append(')');
              logOps.pop();
          }
  
      }
docs: /*
  (non-Javadoc)
  
  @see com.ibm.ws.wim.xpath.util.XPathTranslateHelper#genSearchString(java.lang.StringBuffer, com.ibm.ws.wim.xpath.mapping.datatype.LogicalNode)