Package ghidra.util.xml
Class XmlParserElement
java.lang.Object
ghidra.util.xml.XmlParserElement
A class to represent the start or end tag from an XML file.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanString[]Returns an array containing the names of all attributes defined in this element.getAttrValue(String attrName) Returns the value of the specified attribute.booleangetAttrValueAsBool(String attrName) Returns the boolean value of the specified attribute.doublegetAttrValueAsDouble(String attrName) Returns the double value of the specified attribute.intgetAttrValueAsInt(String attrName) Returns the integer value of the specified attribute.longgetAttrValueAsLong(String attrName) Returns the long value of the specified attribute.intReturns the line number where this element was defined.getName()Returns the name of this element/tag.getText()Returns the text of this element.booleanReturns true if this element contains an attribute with the specified name.booleanisEnd()Returns true if this element represents an end tag.booleanisStart()Returns true if this element represents a start tag.voidsetAttribute(String name, String value) Sets the value of the specified attribute.toString()
- 
Method Details- 
equals
- 
toString
- 
isStartpublic boolean isStart()Returns true if this element represents a start tag.- Returns:
- true if this element represents a start tag
 
- 
isEndpublic boolean isEnd()Returns true if this element represents an end tag.- Returns:
- true if this element represents an end tag
 
- 
getNameReturns the name of this element/tag.- Returns:
- the name of this element/tag
 
- 
getLineNumpublic int getLineNum()Returns the line number where this element was defined.- Returns:
- the line number where this element was defined
 
- 
getTextReturns the text of this element. Or, null if no text existed in the XML.- Returns:
- the text of this element
 
- 
getAttrValueReturns the value of the specified attribute. Or, null if no attribute exists with the specified name.- Parameters:
- attrName- the name of the attribute
- Returns:
- the value of the specified attribute
 
- 
getAttrValueAsBoolReturns the boolean value of the specified attribute.- Parameters:
- attrName- the name of the attribute
- Returns:
- the boolean value of the specified attribute
- Throws:
- XmlAttributeException- if no attribute exists with the specified name
 
- 
getAttrValueAsIntReturns the integer value of the specified attribute.- Parameters:
- attrName- the name of the attribute
- Returns:
- the integer value of the specified attribute
- Throws:
- XmlAttributeException- if no attribute exists with the specified name
 
- 
getAttrValueAsLongReturns the long value of the specified attribute.- Parameters:
- attrName- the name of the attribute
- Returns:
- the long value of the specified attribute
- Throws:
- XmlAttributeException- if no attribute exists with the specified name
 
- 
getAttrValueAsDoubleReturns the double value of the specified attribute.- Parameters:
- attrName- the name of the attribute
- Returns:
- the double value of the specified attribute
- Throws:
- XmlAttributeException- if no attribute exists with the specified name
 
- 
getAttrNamesReturns an array containing the names of all attributes defined in this element.- Returns:
- an array containing the names of all attributes defined in this element
 
- 
hasAttrReturns true if this element contains an attribute with the specified name.- Parameters:
- attrName- the name of the attribute
- Returns:
- true if this element contains an attribute with the specified name
 
- 
setAttributeSets the value of the specified attribute.- Parameters:
- name- the name of the attribute
- value- the value of the attribute
 
 
-