PDA

View Full Version : [SOLVED] XML Display



Tp2357
January 17th, 2010, 06:58 PM
Hi!

I am working on a program that will take an XML document, and display it using HTML... Could I get some help?

Arndt
January 17th, 2010, 10:46 PM
Hi!

I am working on a program that will take an XML document, and display it using HTML... Could I get some help?

What kind of help do you need?

Have you chosen the programming language? Do you know how it should be presented on the page? The same way as xmllint --format does?

wmcbrine
January 18th, 2010, 12:35 AM
XSLT and CSS are your friends.

Tp2357
January 18th, 2010, 01:34 AM
Mainly I need help with the theory of the code to accomplish it. I am amazing with HTML, and okay with Javascript. Is it possible to accomplish it with these languages?

Reiger
January 18th, 2010, 05:17 AM
If you want to do the following:

take XML Doc -> process -> get ‘webpage’ (HTML tree); then XSLT + CSS is definitely the way to go.

If you want to do the following:

inject XML Doc from some source into webpage as styled text; then you can do this with JavaScript. In fact, there is a SyntaxHighlighter (http://alexgorbatchev.com/wiki/SyntaxHighlighter) ready made for the purpose, and it works with more than just XML.