I want to convert html strings to paragraph , the example shows
- Code: Select all
WordprocessingMLPackage wordMLPackage = WordprocessingMLPackage.createPackage();
XHTMLImporter.convert( input, null,wordMLPackage) ;
in my case I want to create paragraphs with the html text and add these paragraphs to tablerow.
- Code: Select all
Tbl tempTable = getTemplateTable(tables, getKey(placeholder)); // get my table
List<Object> tcs = getAllElementFromObject(tempTable, Tc.class); // get all tableContent size is just one
Tc tc=(Tc)tcs.get(0); // get the first table content
List<Object> ps = getAllElementFromObject(tc, P.class); // find all paragraphs I know only one exsists at this point
tc.getContent().remove(ps.get(0)); // remove the first Paragraph
for(Object object :childObjects){ // here childobjects are paragraphs made out of html string I need help here ?
tc.getContent().add(object);
}
Please advice I have html string and want to convert them to List of Paragraphs.