Re: [xml] python xpath



Daniel Veillard wrote:

>>Daniel: it might indeed be convenient to return the content in the __str__
>>attribute
>>(for text nodes only, of course), thus returning the actual text if 'print
>>node'
>>is called.
>
>
>   would you feel like making a small patch to python/libxml.py
> there is also the serialize() method but which is both more generic and more
> complex than a simple text node dump.

right. Well, given that this is just a tiny convenience, I'd suggest just to
add

__str__ = get_content

at line 264

What do you think ?

Stefan



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