question: protected void serializePreRoot ( ) throws IOException { int i ; if ( _preRoot != null ) { for ( i = 0 ; i < _preRoot . size ( ) ; ++ i ) { printText ( ( String ) _preRoot . elementAt ( i ) , true , true ) ; if ( _indenting ) _printer . breakLine ( ) ; } _preRoot . removeAllElements ( ) ; } }
target:  Comments and PIs cannot be serialized before the root element, because the root element serializes the document type, which generally comes first. Instead such PIs and comments are accumulated inside a vector and serialized by calling this method. Will be called when the root element is serialized and when the document finished serializing.