Wiki
Clone wikiscl-manips-group / nengo / Parser
Implementation and Usage Notes
File: parser.py
Implements a wrapper around ElementTree for to simplify access to xml elements for the controllers.py file.
class XMLParser:
def __init__(self, xmlfile):
...
Initialize a parser with the name of the file that has the relevant data. Then the following functions are available:
- getText
- getFloat
- getFloatArray
- getInt
- getIntArray
- getTextArray
Each of these functions takes in as an argument the 'path' to the field, each node separated by a space. For example
neurons = parser.getInt("nengo gravity neurons")
Updated