Ticket #79 (closed enhancement: worksforme)
ElementTreeStream: wrap ElementTree in a Stream
| Reported by: | gavin@… | Owned by: | cmlenz |
|---|---|---|---|
| Priority: | major | Milestone: | |
| Component: | Template engine plugin | Version: | 0.3.3 |
| Keywords: | Cc: |
Description
The attached class wraps an ElementTree element to create a genshi.core.Stream. It is probably a drop-in replacement for the current ET function.
This means you can select(...) the stream. Some paths possible with Genshi do not have equivalents in ElementTree, AFAIK, partly because text nodes are just attributes of elements in ET.
As a convenience. the class also unwraps lists passed in, specifically to handle the result of element.findall(...).
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
