avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rolf Veen <rolf.v...@helide.com>
Subject Re: XPath and Configuration.
Date Mon, 14 Jan 2002 16:13:23 GMT
I'm using the attached Graph class to store XML or YAML
data and then selecting nodes with a simple path expression:

In case of:

<objects>
<foo value="1"/>
<bar value="2"/>
</object>

you can do:

conf.getString("objects.foo.value").

If you have:

<objects>
<foo>1</foo>
<bar>2</bar>
</object>

you can do:

conf.getString("objects.foo").

This class is different from the Avalon Configuration class,
but the same idea (recursivity) could be applied there.

And yes, this is the beginning of a common object for both
configuration and (a non-XML-specific) DOM :-)

For those who don't know about YAML, see www.yaml.org.

Rolf.


Mime
View raw message