|
Boost : |
From: Jose (jmalv04_at_[hidden])
Date: 2006-04-26 14:46:50
On 4/26/06, Sebastian Redl <sebastian.redl_at_[hidden]> wrote:
>
> Jose wrote:
>
> >http://msdn.microsoft.com/visualc/rss.xml
> >
> >
> Parses and displays fine for me. That's without my patch.
Hi Sebastian,
I get this:
Error: /root/vc.xml(1): xml parse error
I am running latest FC4 on x86_64. what platform are you using ?
>So, what is the code to read the multiple titles ? This is my oversight for
> >not looking at this in more detail
> >
> >
> It's rather complicated. This is not what PropTree was built for, as far
> as I can see - support for multiple nodes with the same name is rather
> weak. Path resolution always takes the first that comes up. It's not an
> XPath engine - not by far.
I would think this is needed to query a configuration file with a normal
amount of settings
The steps to take in this specific case would be:
> 1) Get the child "rss.channel".
> 2) Call sort() on the channel. (Marcin, is sort() stable, i.e. would it
> preserve the relative order of the item elements here?)
> 3) Use std::equal_range() with "item" to get the start and end iterator
> of the item elements.
> 4) For each of the items, get the child "title".
I would like to get a method to handle all value matches given a path
string.
One can not afford to write code for a simple case like this. I am not
saying full XPath but probably the library is really incomplete if it can
not handle a basic scenario like this. Marcin, is this in the todo list ?
In many cases I want to use an external xml file as the configuration file
and then use a path query to get the results that I need as configuration
input. In this case I don't want to load the whole xml in a configuration
object but just the subset (I misunderstood the library as I quickly hacked
the debug_settings example and thought this was no brainer)
Sebastian Redl
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk