building dom tree from html file

Hi all, I have the task to build a dom tree from an html file. Concerning this I have two Questions. 1. Knows everyone a good way to build a dom tree from a html file? ( html is not wellformed -> DOM Parser ) 2. Knows everyone a good api, which can do this? Thanks for your help. Frank Piorko

Frank - anything that is not a well-formed XML document is not an XML document. You will first have to think about making it well-formed. Any parser will error out if you try to form a malformed document.

Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).

Yeah - i also search for such a solution, i know html is not werllformed , but there must be some custom parser out there building a dom tree from html.

Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782

posted Apr 30, 2001 09:05:00

0

Why not tweak the HTML and make it well-formed?? Remember - a malformed XML document isn't an XML document in the first place. So parsing has no meaning in that context!

Frank Piorko
Greenhorn

Joined: Apr 30, 2001
Posts: 2

posted Apr 30, 2001 10:13:00

0

I cannot make the html file wellformed by hand. The amount of html files is to big. The application gets every some days many html files from other programmers, who are not familar with the xml/html problem.