Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

MSF Parser

Author:
Christian Neukom

Overview

The MsfParser class and the associated node and type classes create the prser utility that is used thoughout MSF to read model, and simulation definitions in XML format.

Description

The MsfParser is based on the Xerces XML parser. It is being used by various models to parse objects that conform to the schema files included in the parser directory, e.g. geometry.xsd robot.xsd simulation.xsd terrain_feature_list.xsd. The have been written by hand but we have recently investigated automatic generation of these classes in XMLSPY.

Usage

Note: It is very important to call XMLPlatformUtils::Initialize() before the parser is instantiated. After the instance has been created call the load method, giving the file name as the parameter. If the file parsed without error, you will be able to get the document root element by the call, getDocumentRootElement. Form this point on, you are free to traverse the DOM tree in any order. Please look at the enclosed examples, test_nodes.cpp and test_terrain for help in accessing the node data.

Test Program

The test programs print the data contained in a given robot file. A sample robot and Rock description files (motorcycle.xml, RockList.xml) are included in the parser directory.

Use the following test program / test file pairs:

test_nodes motorcycle.xml

test_terrain RockList.xml


Generated on Thu Apr 7 18:21:15 2005 for MST API by  doxygen 1.4.1