Emacs XML Quotations is a set of macros for generating quotations at the end of email messages. At least, that's what I use it for. Integration with Gnus and BBDB is provided. Hopefully the “API” exposed to extract quotations is general enough to integrate into other tools.
Functions for reading the XML Quotations file.
Functions for adding quotations to the end of email messages.
The DTD for the quotations document.
A sample quotations file.