Class XmlElement

java.lang.Object
org.scilab.forge.jlatexmath.XmlElement

public final class XmlElement extends Object
An element of an XML file: its name, its attributes and its child elements. It has what the parsers of the library used of org.w3c.dom.Element, with the same results: getAttribute(java.lang.String) gives "" for an attribute that is not there, and getElementsByTagName(java.lang.String) gives all the descendants of that name, in the order of the document. The text between the elements is not kept (the files have none that matters).
  • Method Details

    • getTagName

      public String getTagName()
    • getAttribute

      public String getAttribute(String name)
      The value of the attribute, or "" if there is none.
    • hasAttribute

      public boolean hasAttribute(String name)
    • getAttributeNames

      public List<String> getAttributeNames()
      The names of the attributes, in the order of the file.
    • getChildren

      public List<XmlElement> getChildren()
      The child elements, in the order of the file.
    • getElementsByTagName

      public XmlNodeList getElementsByTagName(String name)
      All the descendants with this name (not the element itself), in the order of the file.