Example #1
0
  private boolean equalsContent(List otherContent) {
    if (content.size() != otherContent.size()) {
      return false;
    }
    for (int i = 0, osize = otherContent.size(); i < osize; i++) {
      XMLStructure oxs = (XMLStructure) otherContent.get(i);
      XMLStructure xs = (XMLStructure) content.get(i);
      if (oxs instanceof javax.xml.crypto.dom.DOMStructure) {
        if (!(xs instanceof javax.xml.crypto.dom.DOMStructure)) {
          return false;
        }
        Node onode = ((javax.xml.crypto.dom.DOMStructure) oxs).getNode();
        Node node = ((javax.xml.crypto.dom.DOMStructure) xs).getNode();
        if (!DOMUtils.nodesEqual(node, onode)) {
          return false;
        }
      } else {
        if (!(xs.equals(oxs))) {
          return false;
        }
      }
    }

    return true;
  }