xml to xhtml

J

jud779

Hi,
I have a data in xml file and i want to show this on html page and i
am planning to put his on http server.
I am exploring my options to show content of xml file. Consider me new
with html and all i am looking to generate simple html page from xml
data. Also, this xml file that i created was from python code element
tree.

If anyone can give me some guidance what should be the best way to
generate html/xhtml page using python would be great. I am open to
other options like xsl or anything else that can make things simple.

Thanks in advance.
 
J

Joe Riopel

If anyone can give me some guidance what should be the best way to
generate html/xhtml page using python would be great. I am open to
other options like xsl or anything else that can make things simple.

Since you're open to other options, I would take a look at XSLT.

http://www.w3schools.com/xsl/
 
J

jud779

Since you're open to other options, I would take a look at XSLT.

http://www.w3schools.com/xsl/

XSLT sounds good. I have already created temporary XSL and its working
fine. Still question is how to put up this on web server index.html.
I am planning to create one index.html and call cgi python which in
return produces html page from xml/xsl. Does this sounds like a good
plan??
Is there any other options than the one i describe above. If, then pls
help me out.

Thanks in advance
 
S

Stefan Behnel

XSLT sounds good. I have already created temporary XSL and its working
fine. Still question is how to put up this on web server index.html.
I am planning to create one index.html and call cgi python which in
return produces html page from xml/xsl. Does this sounds like a good
plan??
Is there any other options than the one i describe above. If, then pls
help me out.

There are tons of web servers and web frameworks that support Python.

http://wiki.python.org/moin/WebProgramming
http://wiki.python.org/moin/WebFrameworks

Using CGI is a particularly bad idea, as it is very resource consuming to
start up a new Python interpreter for each request. Most web servers also
support Fast-CGI, which basically keeps the interpreter running. Here are
some other ways to do similar things:

http://wiki.python.org/moin/WebServers

You might also want to read about WSGI, which is the Python standard for
web server interfaces. Most web frameworks support it, so this keeps your
application independent of a particular web server (and testable even
without a web server).

If you want to do XSLT in Python, lxml is a very good choice:

http://codespeak.net/lxml/

Stefan
 

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,770
Messages
2,569,586
Members
45,085
Latest member
cryptooseoagencies

Latest Threads

Top