XLM and XSLT

O

Olivier Hoarau

Hello,

I would like to create a file from a xml file with a xslt transformation
in a python program.
Is there someone who can give me some examples to do that ? something
like this

import libxslt
import libxml2

xsl=parseStylesheetFile(xsl file)
xml=parseFile(xml file)
result = applyStylesheet(xls,xml)
saveResultToFilename(result,outfile)


Olivier
 
?

=?ISO-8859-15?Q?Andr=E9?= Kelpe

Olivier said:
Hello,
Hi!

I would like to create a file from a xml file with a xslt transformation
in a python program.
Is there someone who can give me some examples to do that ? something
like this

import libxslt
import libxml2

xsl=parseStylesheetFile(xsl file)
xml=parseFile(xml file)
result = applyStylesheet(xls,xml)
saveResultToFilename(result,outfile)

Looks like lib(xml/xslt)-python interfacefrom http://xmlsoft.org/. Maybe
this is the right choice for you.

For a little overview take a look at this page:

http://uche.ogbuji.net/tech/akara/nodes/2003-01-01/python-xslt

HTH

André
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top