Menu

how to save the parser's result to a file ?

Help
2004-11-08
2013-04-27
  • mikeliu1976

    mikeliu1976 - 2004-11-08

    regards:

    I got the page:
    http://htmlparser.sourceforge.net/wiki/index.php/ReverseHtml

    the parser's source is a URL or a file.
    I would like to ask how to save the parser's result to a file after
    following operations

    (1)add tag.
    (2)remove tags.
    (3)or change the tags's name.
    (4)filter
    .............................
    other operations

    could someone good to gave me a hand?

    Thank you.
    May god be with you.

     
    • Derrick Oswald

      Derrick Oswald - 2004-11-08

      Just use toHtml() to print your list of tags:

                      out = new PrintWriter (new FileOutputStream (file));
                      for (int i = 0; i < list.size (); i++)
                          out.print (list.elementAt (i).toHtml ());
                      out.close ();

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.