JAVA [app engine]: formatting description of an rss feed containing Html -
i have rss feed , want update contents of description tags , after : import new feed (deployed on app engine) in facebook instant article generated articles not formed correctly ! before update content should find best way display articles .
here simple code :
nodelist items = root.getchildnodes().item(0).getchildnodes(); (int = 0; < items.getlength(); i++) { if ("item".equals(items.item(i).getnodename())) { nodelist currentitem = items.item(i).getchildnodes(); (int j = 0; j < currentitem.getlength(); j++) { if ("description".equals(currentitem.item(j).getnodename())) { string description = currentitem.item(j).gettextcontent(); cdatasection cdata = doc.createcdatasection("mycdata"); cdata.setdata(description); currentitem.item(j).appendchild(cdata); } } } } the original description content
the result in facebook instant articles


Comments
Post a Comment