Few XML functions required for diff application
Constructor and description |
---|
XmlUtil
() |
Type | Name and description |
---|---|
private static java.lang.Boolean |
_isNodeInXmlTree(java.lang.String[] pathNodes, groovy.util.slurpersupport.NodeChild Xml) |
static java.lang.Boolean |
isAttrInXmlTree(java.lang.String listPath, groovy.util.slurpersupport.NodeChild Xml) Step by step comparing groovy.util.slurpersupport.NodeChild#parent() of Xml with elements from listPath. |
static java.lang.Boolean |
isNodeInXmlTree(java.lang.String listPath, groovy.util.slurpersupport.NodeChild Xml) Step by step comparing groovy.util.slurpersupport.NodeChild#parent() of Xml with elements from listPath |
static java.lang.Boolean |
isPathInXmlTree(java.lang.String listPath, groovy.util.slurpersupport.NodeChild Xml, java.lang.Boolean forceHasAttr = false) Step by step comparing groovy.util.slurpersupport.NodeChild#parent() of Xml with elements from listPath . |
static java.lang.String |
mapXml(groovy.util.slurpersupport.NodeChild node, java.lang.String prefix = "") Use this method to create list of Aliases for SQL columns that this class will use for SQL to DB comparison. |
static java.lang.String |
printNode(groovy.util.slurpersupport.NodeChild element) Simple alias for groovy.xml.XmlUtil#serialize(GPathResult node) function |
static java.util.List<groovy.util.slurpersupport.NodeChild> |
walkXmlByPath(java.lang.String listPath, groovy.util.slurpersupport.NodeChild Xml) Step by step looking among groovy.util.slurpersupport.NodeChild#children() of Xml elements with groovy.util.slurpersupport.NodeChild#name()equals to elements in listPath . |
static java.lang.String |
walkXmlByPathForAttr(java.lang.String listPath, groovy.util.slurpersupport.NodeChild Xml) Step by step looking among groovy.util.slurpersupport.NodeChild#children() of Xml elements with groovy.util.slurpersupport.NodeChild#name()equals to elements in listPath .
|
static java.lang.String |
walkXmlByPathForValue(java.lang.String listPath, groovy.util.slurpersupport.NodeChild Xml) Step by step looking among groovy.util.slurpersupport.NodeChild#children() of Xml elements with groovy.util.slurpersupport.NodeChild#name()equals to elements in listPath . |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Step by step comparing groovy.util.slurpersupport.NodeChild#parent() of Xml
with elements from listPath.
Last element in listPath
should be marked with '@' sign to define groovy.util.slurpersupport.Attribute
Xml
and all elements listed in listPath
exists for Xml.parent()
listPath
- Node names separated with '.' for 'walking' upwardXml
- XmlNode that will be investigated Step by step comparing groovy.util.slurpersupport.NodeChild#parent() of Xml
with elements from listPath
listPath
exists for Xml.parent()
listPath
- Node names separated with '.' for 'walking' upwardXml
- XmlNode that will be investigated Step by step comparing groovy.util.slurpersupport.NodeChild#parent() of Xml
with elements from listPath
.
If last element in listPath
starts with '@' it is considered as groovy.util.slurpersupport.Attribute
listPath
exists for Xml.parent()
listPath
- Node names separated with '.' for 'walking' upwardXml
- XmlNode that will be investigatedUse this method to create list of Aliases for SQL columns that this class will use for SQL to DB comparison.
node
- groovy.util.slurpersupport.NodeChild with XML structure that needs to be investigatedprefix
- Optional parameter. java.lang.String that will be added to every row in result.
Mostly it is used by function itself for recursive calls.
It is suggested to skip this parameter in all casesSimple alias for groovy.xml.XmlUtil#serialize(GPathResult node) function
element
- groovy.util.slurpersupport.NodeChild XML object that will be transformed into java.lang.String Step by step looking among groovy.util.slurpersupport.NodeChild#children() of Xml
elements with groovy.util.slurpersupport.NodeChild#name()
equals to elements in listPath
. When last element in listPath
reached, returns all elements that match specified Path.
listPath
listPath
- Node names separated with '.' for 'walking' in depth of groovy.util.slurpersupport.NodeChild#children() in Xml
Xml
- XmlNode that will be investigated Step by step looking among groovy.util.slurpersupport.NodeChild#children() of Xml
elements with groovy.util.slurpersupport.NodeChild#name()
equals to elements in listPath
.
Last element in listPath
should be marked with '@' sign to define groovy.util.slurpersupport.Attribute
listPath
- Node names separated with '.' for 'walking' in depth of Xml.children()
Xml
- XmlNode that will be investigated Step by step looking among groovy.util.slurpersupport.NodeChild#children() of Xml
elements with groovy.util.slurpersupport.NodeChild#name()
equals to elements in listPath
. When last element in listPath
reached, returns groovy.util.slurpersupport.NodeChild#text()
or groovy.util.slurpersupport.Attribute#name() value.
If last element in listPath
starts with '@' it is considered as groovy.util.slurpersupport.Attribute
listPath
- Node names separated with '.' for 'walking' in depth of groovy.util.slurpersupport.NodeChild#children()Xml
- XmlNode that will be investigated