|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.ci.config.utils.JDomUtils
public final class JDomUtils
Helper functions to deal with JDom instances.
Method Summary | |
---|---|
static String |
calcXPath(org.jdom.Element rootElement, org.jdom.Element element) Calculates the XPath for the given element . |
static void |
merge(org.jdom.Document target, org.jdom.Document toBeMerged) Merges the distinct information from the two documents. |
static void |
merge(org.jdom.Element target, org.jdom.Element toBeMerged) Merges the distinct information from the two elements. |
static String |
toString(org.jdom.Document document) Returns the string representation of the XML document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void merge(org.jdom.Document target, org.jdom.Document toBeMerged) throws de.smartics.util.lang.NullArgumentException, org.jdom.JDOMException
Note that not the contents of the element is checked to determine if the contents are equal. The merging algorithm simply checks the element names and assumes that two elements are the same, if they have the same name and are on the same level.
target
- the document to add information, if missing.
toBeMerged
- the information to add to the
target
, if missing.
de.smartics.util.lang.NullArgumentException
- if either
target
or
toBeMerged
is
null
.
org.jdom.JDOMException
- on any problem encountered while merging.
public static void merge(org.jdom.Element target, org.jdom.Element toBeMerged) throws org.jdom.JDOMException
Note that not the contents of the element is checked to determine if the contents are equal. The merging algorithm simply checks the element names and assumes that two elements are the same, if they have the same name and are on the same level.
target
- the element to add information, if missing.
toBeMerged
- the information to add to the
target
, if missing.
org.jdom.JDOMException
- on any problem encountered while merging.
public static String calcXPath(org.jdom.Element rootElement, org.jdom.Element element)
element
.
rootElement
- the root element to the element whose path is to be calculated. The returned XPath is relative to the element. May be
null
if a path from the document root is requested.
element
- the element relative to the
rootElement
.
rootElement
to the
element
.
public static String toString(org.jdom.Document document)
document
- the XML document to create its string representation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |