XML
XML
addChild(java.lang.String tag)
XML
addChild(XML child)
java.lang.String
format(int indent)
Format this XML data as a String.
int
getAttributeCount()
Returns the number of attributes.
XML
getChild(int index)
Quick accessor for an element at a particular index.
XML
getChild(java.lang.String name)
Get a child by its name or path.
int
getChildCount()
Returns the number of children.
XML[]
getChildren()
Returns an array containing all the child elements.
XML[]
getChildren(java.lang.String name)
Get any children that match this name or path.
java.lang.String
getContent()
Return the #PCDATA content of the element.
java.lang.String
getContent(java.lang.String defaultValue)
double
getDouble(java.lang.String name)
double
getDouble(java.lang.String name,
double defaultValue)
Returns the value of an attribute.
double
getDoubleContent()
double
getDoubleContent(double defaultValue)
float
getFloat(java.lang.String name)
Returns the value of an attribute, or zero if not present.
float
getFloat(java.lang.String name,
float defaultValue)
Returns the value of an attribute.
float
getFloatContent()
float
getFloatContent(float defaultValue)
int
getInt(java.lang.String name)
int
getInt(java.lang.String name,
int defaultValue)
Returns the value of an attribute.
int
getIntContent()
int
getIntContent(int defaultValue)
java.lang.String
getLocalName()
Returns the name of the element (without namespace prefix).
long
getLong(java.lang.String name,
long defaultValue)
Returns the value of an attribute.
long
getLongContent()
long
getLongContent(long defaultValue)
java.lang.String
getName()
Returns the full name (i.e.
XML
getParent()
Returns the parent element.
java.lang.String
getString(java.lang.String name)
java.lang.String
getString(java.lang.String name,
java.lang.String defaultValue)
boolean
hasAttribute(java.lang.String name)
Returns whether an attribute exists.
boolean
hasChildren()
Returns a boolean of whether or not there are children.
java.lang.String[]
listAttributes()
Get a list of the names for all of the attributes for this node.
java.lang.String[]
listChildren()
Put the names of all children into an array.
static XML
parse(java.lang.String data)
static XML
parse(java.lang.String data,
java.lang.String options)
void
print()
void
removeChild(XML kid)
boolean
save(java.io.File file)
boolean
save(java.io.File file,
java.lang.String options)
void
setContent(java.lang.String text)
void
setDouble(java.lang.String name,
double value)
void
setDoubleContent(double value)
void
setFloat(java.lang.String name,
float value)
void
setFloatContent(float value)
void
setInt(java.lang.String name,
int value)
void
setIntContent(int value)
void
setLong(java.lang.String name,
long value)
void
setLongContent(long value)
void
setName(java.lang.String newName)
void
setString(java.lang.String name,
java.lang.String value)
java.lang.String
toString()
Return the XML document formatted with two spaces for indents.
void
trim()
Removes whitespace nodes.
boolean
write(java.io.PrintWriter output)