docs: @Override
      boolean equivalentXml(Object target) {
          boolean result = false;
  
          if (target instanceof XML) {
              //    TODO    This is a horrifyingly inefficient way to do this so we should make it better.  It may also not work.
              return this.node.toXmlString(getProcessor()).equals( ((XML)target).node.toXmlString(getProcessor()) );
          } else if (target instanceof XMLList) {
              //    TODO    Is this right?  Check the spec ...
              XMLList otherList = (XMLList) target;
  
              if (otherList.length() == 1) {
                  result = equivalentXml(otherList.getXML());
              }
          } else if (hasSimpleContent()) {
              String otherStr = ScriptRuntime.toString(target);
  
              result = toString().equals(otherStr);
          }
  
          return result;
      }