AODL.Document.Export.Html.HTMLContentBuilder.GetTableOfContentsAsHtml C# (CSharp) Метод

GetTableOfContentsAsHtml() публичный Метод

Gets the table of contents as HTML.
public GetTableOfContentsAsHtml ( TableOfContents tableOfContents ) : string
tableOfContents AODL.Document.Content.Text.Indexes.TableOfContents The table of contents.
Результат string
		public string GetTableOfContentsAsHtml(TableOfContents tableOfContents)
		{
			string html					= "";

			try
			{
				if (tableOfContents != null)
				{
					XmlNode nodeTitle	= tableOfContents.Node.SelectSingleNode(
						"text:index-body/text:index-title/text:p",
						tableOfContents.Document.NamespaceManager);
					if (nodeTitle != null)
					{
						html			+= "<p "+this.HTMLStyleBuilder.HeaderHtmlStyles[0]+">\n";
						html			+= nodeTitle.InnerText;
						html			+= "\n</p>\n";
					}

					if (tableOfContents.Content != null)
						html			+= this.GetIContentCollectionAsHtml(tableOfContents.Content);
				}
			}
			catch(Exception ex)
			{
				throw new AODLException("Exception while trying to build a HTML string from a TableOfContents.", ex);
			}

			return html;
		}