Forum OpenACS Development: Re: Image grabbing

Collapse
2: Re: Image grabbing (response to 1)
Posted by Iuri Sampaio on
The problem with tdom is that I get syntax errors if the html is not well written.

For example, a simple li missing closure caused the error bellow

[20/Jun/2013:22:05:28][8714.3036609392][-default:18-] Error: GET http://206.192.23.166:8050/natopia-core/images?
referred by ""
error "Unterminated element 'li' (within 'div')" at position 38963
"ript:joinow('joinow');"INSCREVA-SE AGORA/adivdiv class="shadow"/div/li --Error--
/ul
/div

/li

Collapse
4: Re: Image grabbing (response to 2)
Posted by Gustaf Neumann on
Juri,

are you aware of the "-html" option of "dom parse" (http://tdom.github.io/dom.html)? it handles most html pages, and has no problems with "missing" end tags for LI

all the best
-gustaf nejmann

Collapse
5: Re: Image grabbing (response to 4)
Posted by Iuri Sampaio on
Gustaf,

I used "-html" parameter on "dom parse". Have a look

set doc [dom parse -html $result]

set doc [dom parse -simple -html $result]

Syntax errors still remains.