Re: possible to get DOM of a poor formed html url?
"Amit Saurav" <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.dom |
|---|---|
| Message-ID | <[email protected]> |
You could look at JTidy or Mozilla Java Html Parsers which automatically cleans an ill formed HTML and gives u a proper DOM object. But for that u have to call a java program from your script. Have a look at: http://mozillaparser.sourceforge.net/ http://jtidy.sourceforge.net/ HTH On Sat, Feb 23, 2008 at 9:53 PM, <[email protected]> wrote: > I have the text of a poorly formed html document (EG www.engdaget.com), > is it possible to make a DOM obj from it, even though it is poorly > formed? > > Using a DOMParser returns a parsererror, saying it is not well-formed. > > Is there any other way? > I'm trying to extract link tags and examine the attributes but would > hate to resort to regular expressions and string parsing... > > Thanks!! > _______________________________________________ > dev-tech-dom mailing list > [email protected] > https://lists.mozilla.org/listinfo/dev-tech-dom >