/// <summary> /// This is used to acquire the root output node for the document. /// This will create an empty node that can be used to generate /// the root document element as a child to the document. /// <p> /// Depending on whether or not an encoding has been specified /// this method will write a prolog to the generated XML document. /// Each prolog written uses an XML version of "1.0". /// </summary> /// <returns> /// this returns an output element for the document /// </returns> public OutputNode WriteRoot() { OutputDocument root = new OutputDocument(this, stack); if (stack.IsEmpty()) { writer.WriteProlog(); } return(root); }
/// <summary> /// This is used to acquire the root output node for the document. /// This will create an empty node that can be used to generate /// the root document element as a child to the document. /// <p> /// Depending on whether or not an encoding has been specified /// this method will write a prolog to the generated XML document. /// Each prolog written uses an XML version of "1.0". /// </summary> /// <returns> /// this returns an output element for the document /// </returns> public OutputNode WriteRoot() { OutputDocument root = new OutputDocument(this, stack); if(stack.IsEmpty()) { writer.WriteProlog(); } return root; }