java.lang.Object | |
↳ | com.atlassian.jira.functest.config.ConfigXmlUtils |
Some helper methods for reading in JIRA XML manipulation.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Add a new child element to the passed parent.
| |||||||||||
Return the element matched by the passed XPath.
| |||||||||||
Find all the elements returned by the passed xpath.
| |||||||||||
Get the integer value of the passed attribute off the passed element.
| |||||||||||
Get the long value of the passed attribute off the passed element.
| |||||||||||
Get the text value of the passed attribute off the passed element.
| |||||||||||
Return all the elements directly under the root of the passed document with the passed name.
| |||||||||||
Remove the attribute from the passed element.
| |||||||||||
Remove the passed element from dom tree.
| |||||||||||
Sets the attribute of the passed element.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Add a new child element to the passed parent. The element will be place after other elements of the same name, or if no other elements exist, as the first child of the parent.
parent | the node to add the element to. |
---|---|
elementName | the name of the element to add. |
Return the element matched by the passed XPath. If the xpath matches more than one Node or matches a non-element,
a IllegalArgumentException
will be thrown. A null value will be returned if the xpath matches nothing.
document | the document to run the xpath over. |
---|---|
xpath | the xpath to run. |
Find all the elements returned by the passed xpath. Will throw an IllegalArgumentException
if the passed
xpath returns anything by Elements.
document | the document to run the xpath on. |
---|---|
xpath | the xpath to run. |
IllegalArgumentException | if the xpath returns non-element nodes. |
---|
Get the integer value of the passed attribute off the passed element. In JIRA XML backups, an attribute can be stored as either an XML attribute or as an element if necessary.
element | the element to get the attribute off. |
---|---|
attribute | the name of the attribute to find. |
Get the long value of the passed attribute off the passed element. In JIRA XML backups, an attribute can be stored as either an XML attribute or as an element if necessary.
element | the element to get the attribute off. |
---|---|
attribute | the name of the attribute to find. |
Get the text value of the passed attribute off the passed element. In JIRA XML backups, an attribute can be stored as either an XML attribute or as an element if necessary.
element | the element to get the attribute off. |
---|---|
attribute | the name of the attribute to find. |
Return all the elements directly under the root of the passed document with the passed name. Returns an empty list if no such elements exist.
document | the document to look through. |
---|---|
name | the name of the elements to return. |
Remove the attribute from the passed element. In JIRA XML backups, an attribute can be stored as either an XML attribute or as an element if necessary.
element | the element to remove the attribute from. |
---|---|
attributeName | the name of the attribute to remove. |
Remove the passed element from dom tree.
element | the element to remove. |
---|
Sets the attribute of the passed element.
element | the element to set the attribute on. |
---|---|
attributeName | the name of the attribute to set. |
attributeValue | the value of the attribute. |