Home

Dmitri Fedoruk wrote:
> def extApplyXslt(xslt, data, logger ):
> try:
> strXslt = urllib2.urlopen(xslt).read()
> # i have to read the xslt url to the python string
> except urllib2.HTTPError, e:
> .......
> except urllib2.URLError, e:
> .............
> try:
> xslt_parser = etree.XMLParser()
> xslt_parser.resolvers.add( PrefixResolver("XSLT") )
>
> # and now I have to use the string; a more elegant solution,
> anyone?

Sure, lxml.etree can parse from file-like objects. Just hand in the result of
urlopen().

Apart from that, I saw that you found your way to the lxml mailing list, I'll
respond over there.

Stefan

previous
next

Re: Class diagrams
Re: How to pass a reference to the current module
pat-match.lisp or extend-match.lisp in Python?
Re: Question about objects
Re: Where do I download Comeau compiler.
poker
gry na ps3
Przedszkole Opole
artykuły biurowe
wycena nieruchomości Kraków