I have a method which has a property description of type "Element" and then I try to add another element using Jsoup.after method.
However, it produces
Exception in thread "main" java.lang.IllegalArgumentException: Object must not be null.
On the other hand, the append method works so well, but I that's not what I really want.
The code is below:
private static void buildTotalvaluesTable2()
{
Element readyDesc = new Element("p style=\"margin-top:5px\">This is description</p");
Element totalValuesTable = new Element("table style=\"width:100%; border: 0px; margin-top:20px;\" class=\"hidden\">" +
"<tbody></tbody>" +
"</table");
readyDesc.after(totalValuesTable.outerHtml());
System.out.println(readyDesc.outerHtml());
}
What I really want to achieve is simply totalValuesTable going after readyDesc.
Can anybody help?