Class SimpleXMLElement

java.lang.Object
org.eclnt.ccee.simplexml.SimpleXMLElement

public class SimpleXMLElement extends Object
XML element that only consists out of attributes and simple sub-elements.
  • Constructor Details

    • SimpleXMLElement

      public SimpleXMLElement(String name)
  • Method Details

    • getName

      public String getName()
    • setName

      public void setName(String name)
    • setValue

      public void setValue(String name, String value)
    • getValue

      public String getValue(String name)
    • getValueMap

      public Map<String,String> getValueMap()
    • removeAllSubElements

      public void removeAllSubElements()
    • removeValue

      public void removeValue(String name)
    • removeAllSubElements

      public void removeAllSubElements(String name)
    • removeSubElement

      public void removeSubElement(SimpleXMLElement subElement)
    • getSubElements

      public List<SimpleXMLElement> getSubElements()
      Returns:
      All sub elements.
    • getSubElements

      public List<SimpleXMLElement> getSubElements(String name)
      Returns:
      All sub elements with a certain name.
    • getSubElement

      public SimpleXMLElement getSubElement(String name)
      Returns:
      The first sub element with a certain name. Convenience method if there is only sub element. Returns null if nothing found.
    • addSubElement

      public SimpleXMLElement addSubElement(String name)
    • addSubElement

      public void addSubElement(SimpleXMLElement xmle)
    • getParent

      public SimpleXMLElement getParent()
    • toXML

      public String toXML()
    • toXML

      public String toXML(boolean withSubElementSorting)
    • sortSubElementsForOutput

      protected void sortSubElementsForOutput(List<SimpleXMLElement> subs)
    • creaeNewInstance

      protected SimpleXMLElement creaeNewInstance(String name)
    • createXML

      protected void createXML(StringBuffer xml, int level, boolean withSorting)