[tpm] Good examples?

Liam R E Quin liam at holoweb.net
Sat Nov 9 19:25:03 PST 2013


On Fri, 2013-11-08 at 09:30 -0500, arocker at Vex.Net wrote:
> Does anyone know of a good explanation/example of how to use XML::SAX
> anywhere online?
[...]
> extracting 3 fields per record from a STDIN stream of records containing 5
> or 6 embedded in XML tags.

Although this is moderately easy with SAX, and if you still need
examples I can probably dig some up. The most important gotcha with sax
is that element content (text) might be split over several callbacks.

These days I'd want to use a domain-specific language such as XPath or
XQuery if possible; if not, then yes, SAX for streaming.

Liam

-- 
Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/
Pictures from old books: http://fromoldbooks.org/
Ankh: irc.sorcery.net irc.gnome.org freenode/#xml



More information about the toronto-pm mailing list