|
Boost : |
From: Jose (jmalv04_at_[hidden])
Date: 2006-04-26 14:13:41
On 4/26/06, Sebastian Redl <sebastian.redl_at_[hidden]> wrote:
>
> Jose wrote:
> >2. parsing the MSDN visual c++ feed
> >
> >Result: FAILED
> >
> >The path is rss.channel.item.title and I get an "xml parse error". Is
> there
> >a posibility of getting more meaningful errors ?
> >
> >
> Do you have an URL?
http://msdn.microsoft.com/visualc/rss.xml
>3. parsing the main CNN feed
> >
> >Result: FAILED
> >
> >The path is rss.channel.item.title. This query fails with no error but if
> >the path is shortened to rss.channel.item it dumps all the values within
> >item, but there is no value at that level (only nested tags)
> >
> >
> You misunderstand your own program. A node has only one value. What your
> loop does it retrieve all the children of the node you select with the
> path and print their values.
> So for the path rss.channel.item.title, you get the title element of the
> first item element in the channel. This element has no children, so the
> loop is never entered.
> In your second test you specify rss.channel.item, so you get the item
> element. This element has four children: the title, link, description
> and pubDate elements. For each of these children, the value (content) is
> printed.
> The test succeeded.
So, what is the code to read the multiple titles ? This is my oversight for
not looking at this in more detail
>4. Parsing the Google News RSS feed
> >
> >Result: FAILED
> >
> >The path is rss.channel.item.title. I get "Invalid character entity
> error".
> >A more meaningful error should be possible with the position in the file
> >where the entity occurs.
> >
> >
> Again, the problem seems to be the " entity.
>
> >5. Parsing the Google News Atom feed
> >
> >Result: FAILED
> >
> >The path is feed.entry.title. I get "Invalid character entity error".
> >
> >
> Same.
>
> Attached is a patch that fixes the bug.
>
> Sebastian RedlI
Thanks, I think the multiple rss feeds are good for testing as they can
expose multiple issues. I am glad you had tested this also.
Jose
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk