private void NewXmlNode(string stylename, bool protectChanges, string textName)
{
this.Node = ((TextDocument)this.Document).CreateNode("table-of-content", "text");
XmlAttribute xa = ((TextDocument)this.Document).CreateAttribute("style-name", "text");
xa.Value = stylename;
this.Node.Attributes.Append(xa);
xa = ((TextDocument)this.Document).CreateAttribute("protected", "text");
xa.Value = protectChanges.ToString().ToLower();
this.Node.Attributes.Append(xa);
xa = ((TextDocument)this.Document).CreateAttribute("use-outline-level", "text");
xa.Value = "true";
this.Node.Attributes.Append(xa);
xa = ((TextDocument)this.Document).CreateAttribute("name", "text");
xa.Value = ((textName!=null)?textName:"Table of Contents1");//+((TextDocument)this.Document).TableofContentsCount;
this.Node.Attributes.Append(xa);
}