You are here: How to parser the html dtd? « HTML « IT news, forums, messages
How to parser the html dtd?

Posted by Johnny on 10/17/06 09:03

Hi,
Do you know any kind of html dtd parser? I want to parse the html dtd
file and generate a tree or graph containing all the info. I want to
have some basic operations based on the tree or graph:

1. Query which elements can be included under a specific element.
* eg. specify "UL" element, I can get the answer that only "LI"
element can be included under "UL" element

2. Query which elements is needed to construct a document
* eg. specify "TD" element, I can get the answer that if I need to
build a document, I need the following elements in order:
* HTML
* BODY
* TABLE
* TBODY
* TR/TH

I have tried two dtd parser:
http://matra.sourceforge.net/
and
http://www.wutka.com/dtdparser.html

They are all written in Java. But they all can't handle the html dtd.
As you know, html dtd has its own grammar, is there any existing parser
that can handle the html dtd? I don't think I am the first one who need
to manipulate the html dtd data.

Thanks for your consideration.

Regards,
Johnny

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация