public final class XmlSort
extends java.lang.Object
| Constructor and Description |
|---|
XmlSort() |
| Modifier and Type | Method and Description |
|---|---|
static void |
sort(org.apache.xmlbeans.XmlObject element,
java.util.Comparator<org.apache.xmlbeans.XmlCursor> comp)
Sorts the children of
element according to the order indicated by the
comparator. |
public static void sort(org.apache.xmlbeans.XmlObject element,
java.util.Comparator<org.apache.xmlbeans.XmlCursor> comp)
element according to the order indicated by the
comparator.element - the element whose content is to be sorted. Only element children are sorted,
attributes are not touched. When elements are reordered, all the text, comments and PIs
follow the element that they come immediately after.comp - a comparator that is to be used when comparing the QNames of two
elements.java.lang.IllegalArgumentException - if the input XmlObject does not represent
an element