Package scriptella.configuration
Class XmlElement
java.lang.Object
scriptella.configuration.XmlElement
Represents XML element
- Version:
- 1.0
- Author:
- Fyodor Kupolov
-
Constructor Summary
ConstructorsConstructorDescriptionXmlElement(Element element, URL documentUrl, PropertiesSubstitutor substitutor) XmlElement(Element element, XmlElement parent) -
Method Summary
Modifier and TypeMethodDescriptionprotected List<XmlElement>Expands properties in a string.getAttribute(String attribute) Gets the value of attribute.protected booleangetBooleanAttribute(String attribute, boolean defaultValue) Returns the value of boolean attribute.protected List<XmlElement>getChildren(String name) getChildren(Set<String> names) getXPath()
-
Constructor Details
-
XmlElement
-
XmlElement
-
-
Method Details
-
getTagName
-
getElement
-
getDocumentUrl
-
getChildren
-
getXPath
-
getChildren
-
getChildren
-
getChild
-
asList
-
getAttribute
Gets the value of attribute.Additionally property
expansionis performed.- Parameters:
attribute- attribute name.- Returns:
- value of the attribute or null if attribute is absent or has empty value.
-
getBooleanAttribute
Returns the value of boolean attribute.- Parameters:
attribute- attribute name.defaultValue- default value to use if attribute value unspecified.- See Also:
-
expandProperties
Expands properties in a string.- Parameters:
s- string to expand properties.- Returns:
- string with substituted properties.
-