Sorry,cannot get the "UrlModifyingVisitor"'s output
Followings is my codes.
I used ^^^^^^^^^
to mark the codes by which I want to print out the "UrlModifyingVisitor"'s output.
but I cannot get the "UrlModifyingVisitor"'s output.
Did I miss something important? @@.
regards:
Sorry,cannot get the "UrlModifyingVisitor"'s output
Followings is my codes.
I used ^^^^^^^^^
to mark the codes by which I want to print out the "UrlModifyingVisitor"'s output.
but I cannot get the "UrlModifyingVisitor"'s output.
Did I miss something important? @@.
thank you
may god be with you
------------------------------------------------------------------------------------
import org.htmlparser.Parser;
import org.htmlparser.util.NodeIterator;
import org.htmlparser.util.ParserException;
import org.htmlparser.visitors.*;
import java.io.*;
public class ToHtmlDemo
{
public static void main (String[] args) throws ParserException
{
try{
FileOutputStream htmlparserOutput = new FileOutputStream("test3.txt");
PrintWriter out=null;
String MyTest="https://sourceforge.net/forum/forum.php?forum_id=77089";
out = new PrintWriter(htmlparserOutput);
Parser parser = new Parser("test.htm");
parser.setEncoding ("Big5");
UrlModifyingVisitor UrlModifyingVisitorTest = new UrlModifyingVisitor(parser,MyTest);
String UrlModifyingVisitorTestResult;
UrlModifyingVisitorTestResult = UrlModifyingVisitorTest.getModifiedResult();
System.out.println(UrlModifyingVisitorTestResult);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
System.out.println("test");
out.close();
htmlparserOutput.close();
}
catch(IOException e)
{
}
}
}