cz.cmc.tcgui.datadef.parser
Class Children

java.lang.Object
  extended bycz.cmc.tcgui.datadef.parser.Children

public class Children
extends Object

This class is designed for purposes of parsing XML files. It makes parsing easier in case when the XML file doesn't contain any text nodes e.g. all informations are stored in the attributes of tags. It is primarily used by XtcParser class.


Constructor Summary
Children(Node n)
          Creates an instance of the Children object.
 
Method Summary
 Node getChild(int pos)
           
 int getLength()
          Simply returns number of children.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Children

public Children(Node n)
Creates an instance of the Children object. Gets all child elements (Node.ELEMENT_NODE) of Node n. (Because of all data in xtc files are stored in element nodes, none in text nodes.) It adjusts DOM parsing for xtc files.

Method Detail

getLength

public int getLength()
Simply returns number of children.

Returns:
Number of children.

getChild

public Node getChild(int pos)
Returns:
A child at position pos or null if the child doesn't exist.

toString

public String toString()