ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Read XML file from cpp

asked 2014-08-26 07:38:29 -0500

Bastbeat gravatar image

updated 2014-08-26 07:38:55 -0500

Hello, I have a .xml file, which I need to read. Searching in Internet, I saw that I could do that with MSXML. But I can't include the library in my program. Anyone knows how I can do that? Or is there a other way to read a XML file?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-08-26 10:13:43 -0500

I'd recommend using TinyXML as it is already used by several important packages in ROS (e.g. URDF, rviz, rospack). For an example of how to use TinyXML in compilation, check out the CMakeLists.txt file from the kdl_parser package. A relatively self-contained example of how to read an xml file is in their kdl_parser.cpp file.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-08-26 07:38:29 -0500

Seen: 1,369 times

Last updated: Aug 26 '14