By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,002 Members | 1,171 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,002 IT Pros & Developers. It's quick & easy.

HTML Parser doubt

P: 8
Hi ,
I am trying to parse HTML data and retrive the contents. I am facing a problem which I have explained below.

I have imported HTMLParser class and using the handle_data function. The issue here is the '<' and '>' data which is represented as &le and &ge is getting stripped off.

For eg: if the html representation is like &lt;This&gt is an example which will read as <This> is an example . When I parse it, I am getting the value only as This is an example.

ie... '<' and '>' got stripped off....

Please help
Nov 30 '06 #1
Share this Question
Share on Google+
3 Replies


P: 8
Hi ,
Any one has any clue about this one... i am in need of this info very urgently..... :-(
Dec 1 '06 #2

bartonc
Expert 5K+
P: 6,596
Hi ,
Any one has any clue about this one... i am in need of this info very urgently..... :-(
I don't do html, but have you tried "<this> is an example"?
Dec 1 '06 #3

P: 8
Putting in quotes wont work..... This scipt is a genric one which takes many files as input.... Issue here is whenever &le; and &ge; which stands for < and > the handle_data function in HTMLParser class strips those '<' and '>'
Dec 1 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.