org.w3c.dom.Element.isEqualNode()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(6.1k)|赞(0)|评价(0)|浏览(167)

本文整理了Java中org.w3c.dom.Element.isEqualNode()方法的一些代码示例,展示了Element.isEqualNode()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.isEqualNode()方法的具体详情如下:
包路径:org.w3c.dom.Element
类名称:Element
方法名:isEqualNode

Element.isEqualNode介绍

暂无

代码示例

代码示例来源:origin: net.oneandone.cosmo/cosmo-core

/**
 * {@inheritDoc}
 */
@Override
public boolean areEqual(Element one, Element another) {
  if (one==null || another==null) {
    return false;
  }
  return ((Element) one).isEqualNode((Element) another);
}

代码示例来源:origin: 1and1/cosmo

/**
 * {@inheritDoc}
 */
@Override
public boolean areEqual(Element one, Element another) {
  if (one==null || another==null) {
    return false;
  }
  return ((Element) one).isEqualNode((Element) another);
}

代码示例来源:origin: xyz.cofe/common

@Override
public boolean isEqualNode(Node arg) {
  return element.isEqualNode(arg);
}

代码示例来源:origin: com.rackspace.apache/xerces2-xsd11

private boolean compareComponents(Element component1,Element component2){
  //normalize two elements before comparing
  component1.normalize();
  component2.normalize();
  //perform a deep equality comparison on two nodes
  return component1.isEqualNode(component2);
}

代码示例来源:origin: org.assertj/assertj-swing-junit

@Override
public boolean equals(Object obj) {
 if (this == obj)
  return true;
 if (obj == null)
  return false;
 if (getClass() != obj.getClass())
  return false;
 XmlNode other = (XmlNode) obj;
 return target.isEqualNode(other.target);
}

代码示例来源:origin: joel-costigliola/assertj-swing

@Override
public boolean equals(Object obj) {
 if (this == obj)
  return true;
 if (obj == null)
  return false;
 if (getClass() != obj.getClass())
  return false;
 XmlNode other = (XmlNode) obj;
 return target.isEqualNode(other.target);
}

代码示例来源:origin: org.opendaylight.controller/config-util

@Override
public boolean equals(Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  XmlElement that = (XmlElement) o;
  return element.isEqualNode(that.element);
}

代码示例来源:origin: org.opendaylight.controller/netconf-util

@Override
public boolean equals(Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  XmlElement that = (XmlElement) o;
  return element.isEqualNode(that.element);
}

代码示例来源:origin: org.opensingular/singular-commons

/**
 * @see org.w3c.dom.Node#isEqualNode(org.w3c.dom.Node)
 */
public boolean isEqualNode(Node arg) {
  return getCurrentInternal().isEqualNode(arg);
}

代码示例来源:origin: Geomatys/geotoolkit

@Override
public boolean isEqualNode(Node arg) {
  final Element elem = getElement();
  return elem != null ? elem.isEqualNode(arg) : Boolean.FALSE;
}

代码示例来源:origin: org.opensingular/form-core

/**
 * @see org.w3c.dom.Node#isEqualNode(org.w3c.dom.Node)
 */
public boolean isEqualNode(Node arg) {
  return getAtualInterno().isEqualNode(arg);
}

代码示例来源:origin: org.opensingular/singular-commons

/**
 * @see org.w3c.dom.Node#isEqualNode(org.w3c.dom.Node)
 */
@Override
public boolean isEqualNode(Node arg) {
  return original.get().isEqualNode(arg);
}

代码示例来源:origin: org.apache.activemq/activemq-runtime-config

@Override
protected boolean equalsInternal(ObjectLocator leftLocator,
                 ObjectLocator rightLocator, Object lhs, Object rhs) {
  if (lhs instanceof Element && rhs instanceof Element) {
    final Element left = (Element) lhs;
    final Element right = (Element) rhs;
    return left.isEqualNode(right);
  } else {
    return super.equalsInternal(leftLocator, rightLocator, lhs, rhs);
  }
}

代码示例来源:origin: org.opensingular/form-core

/**
 * @see org.w3c.dom.Node#isEqualNode(org.w3c.dom.Node)
 */
@Override
public boolean isEqualNode(Node arg) {
  return original.get().isEqualNode(arg);
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public boolean isEqualNode(Node arg) {
  return element.isEqualNode(soapDocument.getDomNode(arg));
}

代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite

/**
  * Runs the test case.
  * @throws Throwable Any uncaught exception causes test to fail
  */
  public void runTest() throws Throwable {
   Document doc;
   Element elem1;
   Element elem2;
   NodeList employeeList;
   boolean isEqual;
   doc = (Document) load("hc_staff", false);
   employeeList = doc.getElementsByTagName("em");
   elem1 = (Element) employeeList.item(0);
   elem2 = (Element) employeeList.item(1);
   isEqual = elem1.isEqualNode(elem2);
   assertFalse("nodeisequalnode10", isEqual);
}
  /**

代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite

/**
* Runs the test case.
* @throws Throwable Any uncaught exception causes test to fail
*/
public void runTest() throws Throwable {
 Document doc;
 Element elem1;
 Element elem2;
 boolean isEqual;
 doc = (Document) load("hc_staff", false);
 elem1 = doc.createElementNS("http://www.w3.org/1999/xhtml", "xhtml:html");
 elem2 = doc.createElementNS("http://www.w3.org/1999/xhtml", "xhtml:html");
 isEqual = elem1.isEqualNode(elem2);
 assertTrue("nodeisequalnode06", isEqual);
 }
/**

代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite

/**
* Runs the test case.
* @throws Throwable Any uncaught exception causes test to fail
*/
public void runTest() throws Throwable {
 Document doc;
 Element elem1;
 Element elem2;
 boolean isEqual;
 doc = (Document) load("hc_staff", false);
 elem1 = doc.getDocumentElement();
 elem2 = doc.getDocumentElement();
 isEqual = elem1.isEqualNode(elem2);
 assertTrue("nodeisequalnode12", isEqual);
 }
/**

代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite

/**
* Runs the test case.
* @throws Throwable Any uncaught exception causes test to fail
*/
public void runTest() throws Throwable {
 Document doc1;
 Document doc2;
 Element elem1;
 Element elem2;
 boolean isEqual;
 doc1 = (Document) load("hc_staff", false);
 doc2 = (Document) load("hc_staff", false);
 elem1 = doc1.createElementNS("http://www.w3.org/1999/xhtml", "xhtml:html");
 elem2 = doc2.createElementNS("http://www.w3.org/1999/xhtml", "xhtml:html");
 isEqual = elem1.isEqualNode(elem2);
 assertTrue("nodeisequalnode07", isEqual);
 }
/**

代码示例来源:origin: org.apache.ws.commons.axiom/dom-testsuite

/**
* Runs the test case.
* @throws Throwable Any uncaught exception causes test to fail
*/
public void runTest() throws Throwable {
 Document doc1;
 Document doc2;
 Element docElem1;
 Element docElem2;
 boolean isEqual;
 doc1 = (Document) load("barfoo_utf8", false);
 doc2 = (Document) load("barfoo_utf16", false);
 isEqual = doc1.isEqualNode(doc2);
 assertTrue("docAreNotEquals", isEqual);
 docElem1 = doc1.getDocumentElement();
 docElem2 = doc2.getDocumentElement();
 isEqual = docElem1.isEqualNode(docElem2);
 assertTrue("docElemsAreEquals", isEqual);
 }
/**

相关文章

微信公众号

最新文章

更多