Need to parse tables data into database, putting the contence inside<pre> into first columnn of resulting database table.
If I have NodeList containing tables ...how can I get preceeding <pre>s for each table in NodeList ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
situation; (no class, style, ... or something)
<body>
<pre>some text</pre>
<pre>some text</pre>
<table><td-s...></table>
<pre>some text</pre>
<table>><td-s...></table>
<body>
Need to parse tables data into database, putting the contence inside<pre> into first columnn of resulting database table.
If I have NodeList containing tables ...how can I get preceeding <pre>s for each table in NodeList ?
Ok this works somewhere in my way, but how come that toPlainTextString,
, toHtml for <PRE> tag comes out as "" instead actual content ?
tnf = null;
tnf = new TagNameFilter();
tnf.setName("TABLE");
tnf1 = null;
tnf1 = new TagNameFilter();
tnf1.setName("PRE");
OrFilter of = new OrFilter(tnf,tnf1);
nl = parser.parse(of);
for(int i =0; i < nl.size(); i++)
{
String sdjfasdf = nl.elementAt(i).getText();
String sdjfasdf1 = nl.elementAt(i).toPlainTextString();
String sdjfasdf2 = nl.elementAt(i).toHtml();
String sdjfasdf3 = nl.elementAt(i).toString();
}