code: private static boolean nodeListsAreEqual(final NodeList a, final NodeList b) {
          if (a == b) {
              return true;
          }
          if ((a == null) || (b == null)) {
              return false;
          }
          if (a.getLength() != b.getLength()) {
              return false;
          }
          for (int i = 0; i < a.getLength(); ++i) {
              if (!nodesAreEqual(a.item(i), b.item(i))) {
                  return false;
              }
          }
          return true;
      }
docs: NodelLists are equal if and only if their size is equal and the containing nodes at the same
  indexes are equal.
  
  @param a
  @param b
  @return