[Documentation] [TitleIndex] [WordIndex

TinyXML is a simple, small, C++ XML parser that can be integrating into other programs. It is the standard XML parser for ROS. TinyXML is installed as a system dependency, meaning it is not a ROS package and requires some custom CMake code to compile against.

Using the system install version with Catkin

TinyXML does not install a FindTinyXML.cmake file on its own, instead a custom one must be provided. To save ROS developers time and centralize custom *.cmake modules commonly used in ROS, a new catkin package named [cmake_modules](https://github.com/ros/cmake_modules) has been created to aid in including these cmake files. The following steps will instruct you in how to easily use TinyXML with a custom CMake file in ROS.


To use the system dependency of tinyxml, add to your code:

#include <tinyxml.h>


The custom cmake file is included by depending on cmake_modules. Make sure you have cmake_modules and TinyXML including in the following places in your CMakeLists.txt:

  # Load catkin and all dependencies required for this package                                                                                              
  find_package(catkin REQUIRED

  find_package(TinyXML REQUIRED)

  # Declare a catkin package                                                                                                                                

  # Build                                                                                                                                                   
  include_directories(include ${catkin_INCLUDE_DIRS} ${TinyXML_INCLUDE_DIRS})

Then for every library/executable that uses TinyXML, be sure to link libraries:

  target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} ${TinyXML_LIBRARIES})

package.xml dependencies

Add to your package.xml:



External Documentation

Please see the tinyxml website for documentation on using tinyxml.

2019-06-15 13:15