[osg-users] XPath in osg

Serge Lages serge.lages at gmail.com
Tue Jul 1 09:40:45 PDT 2008


Hi David,

Instead of including it into the Core OSG, a possible addition should be a
XPath visitor class (deriving from NodeVisitor) into osgUtil, which takes
the query and traverse the tree to get the results.

I think it's a bit intrusive to put such a feature into the core node class,
and making a visitor is more in the OSG philosophy.

On Tue, Jul 1, 2008 at 6:31 PM, David Johansson <david5566 at gmail.com> wrote:

> 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 =
> Group->SelectMultipleNodes("/Node[@something=\"somethingelse\");
>
> 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
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>



-- 
Serge Lages
http://www.tharsis-software.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080701/8a54fb30/attachment-0003.htm>


More information about the osg-users mailing list