public void StartTree(XPathNodeType rootType) {
Debug.Assert(this.xstate == XmlState.WithinSequence, "StartTree cannot be called in the " + this.xstate + " state.");
Writer = this.seqwrt.StartTree(rootType, this.nsmgr, this.runtime.NameTable);
this.rootType = rootType;
this.xstate = (rootType == XPathNodeType.Attribute || rootType == XPathNodeType.Namespace) ? XmlState.EnumAttrs : XmlState.WithinContent;
}