| Constructor and Description |
|---|
Element(String name,
XmlReader.Element parent) |
| Modifier and Type | Method and Description |
|---|---|
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 index) |
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() |
boolean |
hasAttribute(String name) |
boolean |
hasChild(String name) |
boolean |
hasChildRecursive(String name) |
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) |
public Element(String name, XmlReader.Element parent)
public String getName()
public String getAttribute(String name)
GdxRuntimeException - if the attribute was not found.public boolean hasAttribute(String name)
public int getChildCount()
public XmlReader.Element getChild(int index)
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()
@Null public XmlReader.Element getChildByName(String name)
name - the name of the child XmlReader.Elementpublic boolean hasChild(String name)
@Null public XmlReader.Element getChildByNameRecursive(String name)
name - the name of the child XmlReader.Elementpublic boolean hasChildRecursive(String name)
public Array<XmlReader.Element> getChildrenByName(String name)
name - the name of the childrenArraypublic Array<XmlReader.Element> getChildrenByNameRecursively(String name)
name - the name of the childrenArraypublic 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.Copyright © 2021. All rights reserved.