Wait to flush startDocument until the another event (like startElement) is
seen.  This fixes problems with the xml header being sent out to
the result stream before the serializer is switched when the first
element is HTML.

1 file changed