Things to do: * Make buffer pseudo-dynamical to avoid limitations. * Insert code to deal with XML declarations (really processing instructions) which are not of the form