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();
  }
}

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 ( ) ; } }
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 .
