I have a doc file which has track changes on. Now I delete a paragraph from this. But on parsing paragraph.getText() giving me deleted text also. What can be the reason for this.
//This is the method I am using for parsing and attached the doc which is to be parsed
private String getClausePlainText(Paragraph paraStart) throws Exception{
StringBuffer plainText = new StringBuffer();
Paragraph tempPara = (Paragraph)paraStart.getNextSibling();
while(tempPara != null){
plainText.append(tempPara.getText().substring(0,tempPara.getText().length()-1));
plainText.append("\n");
tempPara = (Paragraph)tempPara.getNextSibling();
if(tempPara != null && tempPara.getListFormat() != null && tempPara.getListFormat().isListItem() && tempPara.getListFormat().getListLevelNumber() <= 1)
break;
}
return plainText.toString();
}
Thanks