473,396 Members | 2,089 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

html processing


Why does the htmllib has such simple parsers? i think that making something
more complicated that printing 'i am inside post tag' is too hard with this
library since the parsers doesnt help at all.

So the htmllib is a regex search with empty methods? i can do that by
myself, no need use a parser, i am a litle confused in this.

Is there a python html parser that creates objects from html sources,like
xml.dom?

Jul 18 '05 #1
3 1441
Ismael Herrera <is*****************@hotmail.com> writes:
[...]
So the htmllib is a regex search with empty methods? i can do that by
myself, no need use a parser, i am a litle confused in this.
It's a little more complicated than that. But feel free to rewrite
sgmllib.py if you so please.

Is there a python html parser that creates objects from html sources,like
xml.dom?


Yes, many.

Which one is best for you depends on what it is you're trying to do.
John
Jul 18 '05 #2
Ismael Herrera...
Is there a python html parser that creates objects from html sources,like
xml.dom?

Perhaps:
http://www.rexx.com/~dkuhlman/gnosis_generateds.html
would help?

Jim
Jul 18 '05 #3
Ismael Herrera <is*****************@hotmail.com> wrote in message news:<ma**************************************@pyt hon.org>...
Why does the htmllib has such simple parsers? i think that making something
more complicated that printing 'i am inside post tag' is too hard with this
library since the parsers doesnt help at all.

So the htmllib is a regex search with empty methods? i can do that by
myself, no need use a parser, i am a litle confused in this.

Is there a python html parser that creates objects from html sources,like
xml.dom?


http://www.xml.com/pub/a/2004/09/08/pyxml.html

--
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://4Suite.org http://fourthought.com

A hands-on introduction to ISO Schematron -
http://www-106.ibm.com/developerwork...ematron-i.html
XML circles the globe - http://www.javareport.com/article.asp?id=9797
Principles of XML design: Considering container elements -
http://www-106.ibm.com/developerwork...x-contain.html
Hacking XML Hacks - http://www-106.ibm.com/developerwork...x-think26.html
A survey of XML standards -
http://www-106.ibm.com/developerwork...rary/x-stand4/
Jul 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Patrick Dunford | last post by:
PHP allows control arrays in forms e.g. this is a counter editing script echo "<input name=\"counterdelname\" type=\"hidden\" value=\""; echo "<input name=\"countername\" type=\"hidden\"...
9
by: Dave Smithz | last post by:
Hi, Summary: Best way to divide out the HTML and PHP in some code I inherited. How can I keep the HTML files separate? Full Details: I've now been working two weeks on PHP / MySQL code I...
2
by: Hubert Hung-Hsien Chang | last post by:
I know you could use the def start_a ..... def end_a ..... to process the <a href=...> anchor </a> tags, but is there a
7
by: Sherry Littletree | last post by:
Hi All I am working on a site that has a large amount of common html on all its web pages. I am looking for a way to place this in a single file so, if changes are made, I can change this...
59
by: Lennart Björk | last post by:
Hi All, I have a tiny program: <!doctype HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>MyTitle</title> <meta...
32
by: Next | last post by:
Hi folks, Years ago, it occurred to me that a lot of the trouble of writing web browsers is caused by the upside-down arrangement of things: Javascript code exists inside a document, when...
2
by: pamelafluente | last post by:
Hi dears, I have a plain HTML page. I want to render it a little interactive. I was thinking to add to it 1 script and events to the elements I want to make interactive. Then, I need to...
2
by: ChianHsieh | last post by:
Hi, I face some problem that I want to filter the all words in HTML. Example: Before Filter: <div id="pp"hello man <br/Thank's for your answer. </div> After Filter:
1
by: gkellymail | last post by:
I have a small javascript/html code below that demonstrates that problem I'm having in a larger program. I've tried all kinds of things to get it to work, but it just won't do what I want. I've...
0
by: Formula | last post by:
Hello everybody,because I am newbie in python two weeks only but I had programming in another languages but the python take my heart there's 3 kind of arrays Wow now I hate JAVA :) . I am working...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
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,...

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.