List of usage examples for org.dom4j.util NodeComparator compare
public int compare(String o1, String o2)
From source file:com.globalsight.terminology.EntryUtils.java
License:Apache License
/** * Tests if two elements are equal. If the elements have simple * content they are compared as is (case-sensitive), otherwise the * comparison ignores case and embedded formatting. *//* w w w . j a va 2 s .c o m*/ static private boolean fieldEquals(Element p_one, Element p_two, NodeComparator p_comp) { if (p_comp.compare(p_one, p_two) == 0) { return true; } if (p_one.hasContent() || p_two.hasContent()) { String text1 = getInnerText(p_one); String text2 = getInnerText(p_two); if (text1.equalsIgnoreCase(text2)) { return true; } } return false; }