|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.newdawn.slick.util.xml.XMLElement
public class XMLElement
A utility wrapper round the standard DOM XML element. This provides a more simple API for accessing attributes, children and providing defaults when schemas arn't used - which is generally a little simpler for most of us.
| Method Summary | |
|---|---|
java.lang.String |
getAttribute(java.lang.String name)
Get the value specified for a given attribute on this element |
java.lang.String |
getAttribute(java.lang.String name,
java.lang.String def)
Get the value specified for a given attribute on this element |
java.lang.String[] |
getAttributeNames()
Get the names of the attributes specified on this element |
boolean |
getBooleanAttribute(java.lang.String name)
Get the value specified for a given attribute on this element as a boolean. |
boolean |
getBooleanAttribute(java.lang.String name,
boolean def)
Get the value specified for a given attribute on this element as a boolean. |
XMLElementList |
getChildren()
Get the complete list of children for this node |
XMLElementList |
getChildrenByName(java.lang.String name)
Get a list of children with a given element name |
java.lang.String |
getContent()
Get the text content of the element, i.e. |
double |
getDoubleAttribute(java.lang.String name)
Get the value specified for a given attribute on this element as an double. |
double |
getDoubleAttribute(java.lang.String name,
double def)
Get the value specified for a given attribute on this element as an double. |
int |
getIntAttribute(java.lang.String name)
Get the value specified for a given attribute on this element as an integer. |
int |
getIntAttribute(java.lang.String name,
int def)
Get the value specified for a given attribute on this element as an integer. |
java.lang.String |
getName()
Get the name of this element |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public java.lang.String[] getAttributeNames()
public java.lang.String getName()
public java.lang.String getAttribute(java.lang.String name)
name - The name of the attribute whose value should be retrieved
public java.lang.String getAttribute(java.lang.String name,
java.lang.String def)
name - The name of the attribute whose value should be retrieveddef - The default value to return if the attribute is specified
public int getIntAttribute(java.lang.String name)
throws SlickXMLException
name - The name of the attribute whose value should be retrieved
SlickXMLException - Indicates a failure to convert the value into an integer
public int getIntAttribute(java.lang.String name,
int def)
throws SlickXMLException
name - The name of the attribute whose value should be retrieveddef - The default value to return if the attribute is specified
SlickXMLException - Indicates a failure to convert the value into an integer
public double getDoubleAttribute(java.lang.String name)
throws SlickXMLException
name - The name of the attribute whose value should be retrieved
SlickXMLException - Indicates a failure to convert the value into an double
public double getDoubleAttribute(java.lang.String name,
double def)
throws SlickXMLException
name - The name of the attribute whose value should be retrieveddef - The default value to return if the attribute is specified
SlickXMLException - Indicates a failure to convert the value into an double
public boolean getBooleanAttribute(java.lang.String name)
throws SlickXMLException
name - The name of the attribute whose value should be retrieved
SlickXMLException - Indicates a failure to convert the value into an boolean
public boolean getBooleanAttribute(java.lang.String name,
boolean def)
throws SlickXMLException
name - The name of the attribute whose value should be retrieveddef - The default value to return if the attribute is specified
SlickXMLException - Indicates a failure to convert the value into an booleanpublic java.lang.String getContent()
public XMLElementList getChildren()
public XMLElementList getChildrenByName(java.lang.String name)
name - The name of the element type that should be retrieved
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||