remove white spaces in html page while parsing.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Merin Lalu
    New Member
    • Oct 2011
    • 20

    remove white spaces in html page while parsing.

    can any one help me??

    i have an html page.. i want to parse the html page using htmlparser library.


    while parsing it should not consider whitespaces and newline..
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    What exactly is the problem now, where are you stuck?

    Comment

    • Merin Lalu
      New Member
      • Oct 2011
      • 20

      #3
      while parsing, white spaces and newlines will be considered as string node.. other than white spaces, i need to print the string nodes.

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Maybe you can configure the parser methods to ignore the white spaces?
        Or maybe you can do a simple check on the string before printing it by doing if(string.trim( ).equals("")).

        Comment

        Working...