2013-07-18 | Paul Boddie | raw annotate files changeset graph | Changed the parsing of HTML documents retrieved using parseURI to use the libxml2 network retrieval support. |
1 #!/usr/bin/env python 2 3 import libxml2dom.svg 4 5 d = libxml2dom.svg.parse("tests/test_svg_basic.xml") 6 g = d.xpath("//svg:g")[0] 7 8 matrix = g.getMatrixTrait("transform") 9 print matrix 10 11 p = g.xpath("svg:path")[0] 12 13 path = p.getPathTrait("d") 14 print path.segments 15 16 # vim: tabstop=4 expandtab shiftwidth=4