parsing html pages from tcl

Posted by mithunmo on Stack Overflow See other posts from Stack Overflow or by mithunmo
Published on 2010-05-27T08:12:38Z Indexed on 2010/05/27 8:21 UTC
Read the original article Hit count: 462

Filed under:
|
|

Hello ,

I using tdom version 0.8.2 to parse html pages.

From the help pages I found the following commands to get the ElementById

TCL code

set html {<html>
<head>
</head>
<body>
<div id="m"> 
</div>
</body>
</html>
}
package require tdom
set doc [ dom parse -html $html ] 
set node  [ $doc getElementById m]

But when I execute the second set command I get a empty string . But cleary the tag has an id of m . Can someone tell where am I going wrong ?

Regards, Mithun

© Stack Overflow or respective owner

Related posts about html

Related posts about dom