I have just created a tutorial here:
http://wiki.inkscape.org/wiki/index.php/SVG_with_javascript

Juca