html processing

I

Ismael Herrera

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?
 
J

John J. Lee

Ismael Herrera said:
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
 
U

Uche Ogbuji

Ismael Herrera said:
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/developerworks/edu/x-dw-xschematron-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/developerworks/xml/library/x-contain.html
Hacking XML Hacks - http://www-106.ibm.com/developerworks/xml/library/x-think26.html
A survey of XML standards -
http://www-106.ibm.com/developerworks/xml/library/x-stand4/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top