public IText CreateTextObject(IDocument document, XmlNode aTextNode)
{
//aTextNode.InnerText = this.ReplaceSpecialCharacter(aTextNode.InnerText);
int i=0;
if (aTextNode.OuterXml.IndexOf("Contains state ") > -1)
i++;
switch(aTextNode.Name)
{
case "#text":
return new SimpleText(document, aTextNode.InnerText);
case "text:span":
return CreateFormatedText(document, aTextNode);
case "text:bookmark":
return CreateBookmark(document, aTextNode , BookmarkType.Standard);
case "text:bookmark-start":
return CreateBookmark(document, aTextNode , BookmarkType.Start);
case "text:bookmark-end":
return CreateBookmark(document, aTextNode , BookmarkType.End);
case "text:a":
return CreateXLink(document, aTextNode);
case "text:note":
return CreateFootnote(document, aTextNode);
case "text:line-break":
return new LineBreak(document);
case "text:s":
return new WhiteSpace(document, aTextNode.CloneNode(true));
case "text:tab":
return new TabStop(document);
default:
return null;
}
}