Hi All,
I am new to Aspose.I went through API documentation.Good documentation :).My requirement is that i want to write some values in word doc(values can have HTML), so for writing HTML i used DocumentBuilder.insertHtml API as well as i want to read some word document which can have HTML in there nodes.I used style mode to extract node values using styles here is my code.
public static ArrayList paragraphsByStyleName(Document doc, String styleName) throws Exception
{
ArrayList paragraphsWithStyle = new ArrayList();
NodeCollection paragraphs = doc.getChildNodes(NodeType.PARAGRAPH, true);
for (Object node : paragraphs)
{
Paragraph paragraph = (Paragraph)node;
if ("Style1".equals(paragraph.getParagraphFormat().getStyle().getName()) ||
"Style2".equals(paragraph.getParagraphFormat().getStyle().getName()))
paragraphsWithStyle.add(paragraph);
}
return paragraphsWithStyle;
}
for (Object node : paragraphs)
{
Paragraph paragraph = (Paragraph)node;
System.out.println(paragraph.toTxt());
}
When i run this node’s text value dont give image which i have added :(…neither i am unable to find any API which can return my HTML
Can somebody help me?
Thanks & Regards,
- Amey