AODL.Document.Content.Text.Indexes.Bookmark.NewXmlNode C# (CSharp) Method

NewXmlNode() private method

Create the XmlNode.
private NewXmlNode ( BookmarkType type, string bookmarkname ) : void
type BookmarkType The bookmark type.
bookmarkname string The bookmark name.
return void
		private void NewXmlNode(BookmarkType type, string bookmarkname)
		{
			if (type == BookmarkType.Start)
				this.Node		= this.Document.CreateNode("bookmark-start", "text");
			else if (type == BookmarkType.End)
				this.Node		= this.Document.CreateNode("bookmark-end", "text");
			else
				this.Node		= this.Document.CreateNode("bookmark", "text");

			XmlAttribute xa		= this.Document.CreateAttribute("name", "text");
			xa.Value			= bookmarkname;

			this.Node.Attributes.Append(xa);
		}