|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.badlogic.gdx.utils.XmlReader.Element
public static class XmlReader.Element
Constructor Summary | |
---|---|
XmlReader.Element(String name,
XmlReader.Element parent)
|
Method Summary | |
---|---|
void |
addChild(XmlReader.Element element)
|
String |
get(String name)
Returns the attribute value with the specified name, or if no attribute is found, the text of a child with the name. |
String |
get(String name,
String defaultValue)
Returns the attribute value with the specified name, or if no attribute is found, the text of a child with the name. |
String |
getAttribute(String name)
|
String |
getAttribute(String name,
String defaultValue)
|
ObjectMap<String,String> |
getAttributes()
|
boolean |
getBoolean(String name)
Returns the attribute value with the specified name, or if no attribute is found, the text of a child with the name. |
boolean |
getBoolean(String name,
boolean defaultValue)
Returns the attribute value with the specified name, or if no attribute is found, the text of a child with the name. |
boolean |
getBooleanAttribute(String name)
|
boolean |
getBooleanAttribute(String name,
boolean defaultValue)
|
XmlReader.Element |
getChild(int i)
|
XmlReader.Element |
getChildByName(String name)
|
XmlReader.Element |
getChildByNameRecursive(String name)
|
int |
getChildCount()
|
Array<XmlReader.Element> |
getChildrenByName(String name)
|
Array<XmlReader.Element> |
getChildrenByNameRecursively(String name)
|
float |
getFloat(String name)
Returns the attribute value with the specified name, or if no attribute is found, the text of a child with the name. |
float |
getFloat(String name,
float defaultValue)
Returns the attribute value with the specified name, or if no attribute is found, the text of a child with the name. |
float |
getFloatAttribute(String name)
|
float |
getFloatAttribute(String name,
float defaultValue)
|
int |
getInt(String name)
Returns the attribute value with the specified name, or if no attribute is found, the text of a child with the name. |
int |
getInt(String name,
int defaultValue)
Returns the attribute value with the specified name, or if no attribute is found, the text of a child with the name. |
int |
getIntAttribute(String name)
|
int |
getIntAttribute(String name,
int defaultValue)
|
String |
getName()
|
XmlReader.Element |
getParent()
|
String |
getText()
|
void |
remove()
|
void |
removeChild(int index)
|
void |
removeChild(XmlReader.Element child)
|
void |
setAttribute(String name,
String value)
|
void |
setText(String text)
|
String |
toString()
|
String |
toString(String indent)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public XmlReader.Element(String name, XmlReader.Element parent)
Method Detail |
---|
public String getName()
public ObjectMap<String,String> getAttributes()
public String getAttribute(String name)
GdxRuntimeException
- if the attribute was not found.public String getAttribute(String name, String defaultValue)
public void setAttribute(String name, String value)
public int getChildCount()
public XmlReader.Element getChild(int i)
GdxRuntimeException
- if the element has no children.public void addChild(XmlReader.Element element)
public String getText()
public void setText(String text)
public void removeChild(int index)
public void removeChild(XmlReader.Element child)
public void remove()
public XmlReader.Element getParent()
public String toString()
toString
in class Object
public String toString(String indent)
public XmlReader.Element getChildByName(String name)
name
- the name of the child XmlReader.Element
public XmlReader.Element getChildByNameRecursive(String name)
name
- the name of the child XmlReader.Element
public Array<XmlReader.Element> getChildrenByName(String name)
name
- the name of the children
Array
public Array<XmlReader.Element> getChildrenByNameRecursively(String name)
name
- the name of the children
Array
public float getFloatAttribute(String name)
GdxRuntimeException
- if the attribute was not found.public float getFloatAttribute(String name, float defaultValue)
public int getIntAttribute(String name)
GdxRuntimeException
- if the attribute was not found.public int getIntAttribute(String name, int defaultValue)
public boolean getBooleanAttribute(String name)
GdxRuntimeException
- if the attribute was not found.public boolean getBooleanAttribute(String name, boolean defaultValue)
public String get(String name)
GdxRuntimeException
- if no attribute or child was not found.public String get(String name, String defaultValue)
GdxRuntimeException
- if no attribute or child was not found.public int getInt(String name)
GdxRuntimeException
- if no attribute or child was not found.public int getInt(String name, int defaultValue)
GdxRuntimeException
- if no attribute or child was not found.public float getFloat(String name)
GdxRuntimeException
- if no attribute or child was not found.public float getFloat(String name, float defaultValue)
GdxRuntimeException
- if no attribute or child was not found.public boolean getBoolean(String name)
GdxRuntimeException
- if no attribute or child was not found.public boolean getBoolean(String name, boolean defaultValue)
GdxRuntimeException
- if no attribute or child was not found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |