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



>>>>> "MC" == Murray Cumming <murrayc t-online de> writes:

 MC> Also, maybe we should rename 

 MC>  NodeSet find(const std::string& xpath) const;

 MC> to find_by_xpath() or something similar? find() seems a bit generic,
 MC> particularly when it just takes std::string which is also very generic.

How about having a class XPath as a parameter to find, and an
(explicit) constructor from std::string to XPath?  That way, one can
write "mynode.find(XPath(my_xpath_string));" if one have a string.

Also, the XPath constructor could (in the future) actually parse the
xpath, so that doesn't have to be done for every find().


-- 
Rasmus Kaj ----------------------------------------------- rasmus kaj se
 \       I do not fear computers. I fear the lack of them. -Isaac Asimov
  \------------------------------------- http://www.stacken.kth.se/~kaj/




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