Re: [Re: [libxml++] Node's xpath methods]



Stefan Seefeld <seefeld sympatico ca> wrote:
> Murray Cumming wrote:
> > Node now has
> > 
> >   std::string get_path() const;
> > 
> > Should we rename this to get_xpath()?
> 
> what else can 'path' mean in the context of xml ?

I don't know. Why is the xpath specification called xpath instead of path?

> libxml2 calls
> the appropriate method 'xmlGetNodePath'...

Yes, I noticed that, but I don't think much of the libxml API.

> > Also, maybe we should rename 
> > 
> >  NodeSet find(const std::string& xpath) const;
> > 
> > to find_by_xpath() or something similar? find() seems a bit generic,
> > particularly when it just takes std::string which is also very generic.
> 
> that's true (and I agree that it should take an 'XPath' object instead
> of a string).

Yes, that would be best.


Murray Cumming
murrayc usa net
www.murrayc.com





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]