add xml; fixed 2 lexical bugs from book version