[osg-users] XPath in osg

David Johansson david5566 at gmail.com
Tue Jul 1 09:31:46 PDT 2008

Hi everyone,

I was wondering if there are any plans on adding some sort of
search-querys into osg, XPath for example?

Something like:
osg::Node* n = Group->SelectSingleNode("//Node[@name=\"node1\"]");
std::vector<osg::Node*> nodeList =

or, just get a node based on their names.
osg::Node* n = Group->SelectNode("/Tank/Turret");

If any of this has already been addressed i would be happy if someone
would point me in the correct direction.

For thoose not familiar with XPath, its a way to search thorough XML-nodes.
See. http://www.w3schools.com/xpath/xpath_syntax.asp?output=print

David Johansson

More information about the osg-users mailing list