I can't fetch dom node in svg file with getElementById method (module minidom and libxml2dom)

KLEIN Stéphane stephane at is-webdesign.com
Mon Aug 25 08:56:04 EDT 2008


Le Mon, 25 Aug 2008 04:30:00 -0700, Paul Boddie a écrit :

>> Well, my final purpose isn't to fetch root dom node but to fetch many
>> other sub node.
> 
> You could always try using an XPath expression:
> 
>   node = (dom2.xpath("//*[@id='svg2383']") or [None])[0]
> 
> Similar things could be done in PyXML and other libraries, I'm sure, but
> minidom lacks XPath support, if I remember correctly.

Thanks ! It work.

Regards,
Stephane





More information about the Python-list mailing list