[XML-SIG] using libxslt with strings
Paul Tremblay
phthenry at earthlink.net
Mon Feb 16 05:12:06 EST 2004
On Mon, Feb 16, 2004 at 10:28:34AM +0100, Paul Boddie wrote:
> > styledoc = libxml2.parseFile("/home/paul/paultemp/test.xsl")
> > style = libxslt.parseStylesheetDoc(styledoc)
> > doc = libxml2.parseFile("/home/paul/paultemp/test.xml")
> > result = style.applyStylesheet(doc, None)
> > style.freeStylesheet()
> > doc.freeDoc()
> > # style.saveResultToFilename("foo", result, 0)
>
> Try this:
>
> s = style.saveResultToString(result)
>
I got this error message:
Traceback (most recent call last):
File "/home/paul/paultemp/python_check3.py", line 32, in ?
s = style.saveResultToString(result)
AttributeError: stylesheet instance has no attribute 'saveResultToString'
Also, before I forget, I also need to read *from* a string. I tried:
doc = libxml2.parseString("/home/paul/paultemp/test.xml")
But had no luck.
--
************************
*Paul Tremblay *
*phthenry at earthlink.net*
************************
More information about the XML-SIG
mailing list