Class XmlElement

java.lang.Object
scriptella.configuration.XmlElement

public class XmlElement extends Object
Represents XML element
Version:
1.0
Author:
Fyodor Kupolov
  • Constructor Details

  • Method Details

    • getTagName

      public String getTagName()
    • getElement

      public Element getElement()
    • getDocumentUrl

      public URL getDocumentUrl()
    • getChildren

      protected List<XmlElement> getChildren()
    • getXPath

      public String getXPath()
    • getChildren

      public List<XmlElement> getChildren(String name)
    • getChildren

      public List<XmlElement> getChildren(Set<String> names)
    • getChild

      public XmlElement getChild(String name)
    • asList

      protected List<XmlElement> asList(NodeList list)
    • getAttribute

      public String getAttribute(String attribute)
      Gets the value of attribute.

      Additionally property expansion is performed.

      Parameters:
      attribute - attribute name.
      Returns:
      value of the attribute or null if attribute is absent or has empty value.
    • getBooleanAttribute

      protected boolean getBooleanAttribute(String attribute, boolean defaultValue)
      Returns the value of boolean attribute.
      Parameters:
      attribute - attribute name.
      defaultValue - default value to use if attribute value unspecified.
      See Also:
    • expandProperties

      public String expandProperties(String s)
      Expands properties in a string.
      Parameters:
      s - string to expand properties.
      Returns:
      string with substituted properties.