Lots of implementation done.  Need to fix the bugs in the XML newline handling.