libgdx API

com.badlogic.gdx.utils
Class Xml.Element

java.lang.Object
  extended by com.badlogic.gdx.utils.Xml.Element
Enclosing class:
Xml

public static class Xml.Element
extends java.lang.Object


Constructor Summary
Xml.Element(java.lang.String name)
           
 
Method Summary
 void addChild(Xml.Element element)
           
 java.lang.String getAttribute(java.lang.String name)
           
 boolean getBooleanAttribute(java.lang.String name)
          Returns the attribute as a boolean.
 Xml.Element getChild(int i)
           
 Xml.Element getChildByName(java.lang.String name)
           
 Xml.Element getChildByNameRecursive(java.lang.String name)
           
 int getChildCount()
           
 Array<Xml.Element> getChildrenByName(java.lang.String name)
           
 float getFloatAttribute(java.lang.String name)
          Returns the attribute as a float.
 int getIntAttribute(java.lang.String name)
          Returns the attribute as an int.
 java.lang.String getName()
           
 java.lang.String getText()
           
 void setAttribute(java.lang.String name, java.lang.String value)
           
 void setText(java.lang.String text)
           
 java.lang.String toString()
           
 java.lang.String toString(java.lang.String indent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Xml.Element

public Xml.Element(java.lang.String name)
Method Detail

getName

public java.lang.String getName()

getAttribute

public java.lang.String getAttribute(java.lang.String name)

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)

getChildCount

public int getChildCount()

getChild

public Xml.Element getChild(int i)

addChild

public void addChild(Xml.Element element)

getText

public java.lang.String getText()

setText

public void setText(java.lang.String text)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(java.lang.String indent)

getChildByName

public Xml.Element getChildByName(java.lang.String name)
Parameters:
name - the name of the child Xml.Element
Returns:
the first child having the given name or null, does not recurse

getChildByNameRecursive

public Xml.Element getChildByNameRecursive(java.lang.String name)
Parameters:
name - the name of the child Xml.Element
Returns:
the first child having the given name or null, recurses

getChildrenByName

public Array<Xml.Element> getChildrenByName(java.lang.String name)
Parameters:
name - the name of the children
Returns:
the children with the given name or an empty Array

getFloatAttribute

public float getFloatAttribute(java.lang.String name)
Returns the attribute as a float.

Parameters:
name - the name of the attribute
Returns:
the attribute

getIntAttribute

public int getIntAttribute(java.lang.String name)
Returns the attribute as an int.

Parameters:
name - the name of the attribute
Returns:
the attribute

getBooleanAttribute

public boolean getBooleanAttribute(java.lang.String name)
Returns the attribute as a boolean.

Parameters:
name - the name of the attribute
Returns:
the attribute

libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)