473,511 Members | 16,756 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HTML Parser doubt

8 New Member
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
3 1585
shajias
8 New Member
Hi ,
Any one has any clue about this one... i am in need of this info very urgently..... :-(
Dec 1 '06 #2
bartonc
6,596 Recognized Expert Expert
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
shajias
8 New Member
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

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

Similar topics

7
2577
by: YoBro | last post by:
Hi I have used some of this code from the PHP manual, but I am bloody hopeless with regular expressions. Was hoping somebody could offer a hand. The output of this will put the name of a form...
4
2437
by: Leif K-Brooks | last post by:
I'm writing a site with mod_python which will have, among other things, forums. I want to allow users to use some HTML (<em>, <strong>, <p>, etc.) on the forums, but I don't want to allow bad...
0
2711
by: Himanshu Garg | last post by:
Hello, I am using HTML::Parser to extract text from html pages from http://bbc.co.uk/urdu/ However the encoding of the input text seems to change to some unknown encoding in the output. The...
3
3108
by: Himanshu Garg | last post by:
Hello, I am trying to pinpoint an apparent bug in HTML::Parser. The encoding of the text seems to change incorrectly if the locale isn't set properly. However Parser.pm in the directory...
3
1933
by: cr88192 | last post by:
for various reasons, I added an imo ugly hack to my xml parser. basically, I wanted the ability to have binary payload within the xml parse trees. this was partly because I came up with a binary...
6
4577
by: Sharon | last post by:
Hi all. My goal is to convert html elements to bitmap. So the first step would be to parse the html. System.Windows.Forms.WebBrowser even has a method called DrawToBitmap, which makes the whole...
0
1978
by: june | last post by:
Hi, I have a big problem with parsing HTML into a XHTML using Cberneko to validate the html. First I tried to work with a HTML-File. This solutions works fine: String aHTMLFile =...
0
928
by: archana | last post by:
Hi all, I have read in one article that code-behind is ignore by asp.net parser. Only src attribute is used by asp.net parser. So my doubt here is if src attrribue is used by asp.net parser...
1
8723
by: charlesvc | last post by:
Hallo I am working on web design on mobile. So i came to know for webpage in html or xhtml needs to be parsed to show on mobile So my doubt is the parsing will give only tags text...
3
5045
by: NHM | last post by:
I don't know if it's just me, but DB2 seems to have the worst syntatic parser ever created! Even after triple checking the documentation online, for the syntax of the statements the CLP seems to...
0
7242
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7138
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7510
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5668
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5066
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3225
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1576
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
447
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.