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;
}