private Cell CreateTableCell(XmlNode node)
{
try
{
//Create a new Cel
Cell cell = new Cell(this._document, node);
ContentCollection iColl = new ContentCollection();
//Recieve CellStyle
IStyle cellStyle = this._document.Styles.GetStyleByName(cell.StyleName);
if (cellStyle != null)
{
cell.Style = cellStyle;
}
//No need for a warning
//Create the cells content
foreach(XmlNode nodeChild in cell.Node.ChildNodes)
{
IContent iContent = this.CreateContent(nodeChild);
if (iContent != null)
{
//iColl.Add(iContent);
AddToCollection(iContent, iColl);
}
else
{
this.OnWarning(new AODLWarning("Couldn't create IContent from a table cell.", nodeChild));
}
}
cell.Node.InnerXml = "";
foreach(IContent iContent in iColl)
AddToCollection(iContent,cell.Content);
//cell.Content.Add(iContent);
return cell;
}
catch(Exception ex)
{
throw new AODLException("Exception while trying to create a Table Row.", ex);
}
}