code for converting XML documents into separate markup and text - and back again.