wood burning stoves*
The moose likes XML and Related Technologies and the fly likes How to show a xml as a svg in IE? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to show a xml as a svg in IE?" Watch "How to show a xml as a svg in IE?" New topic
Author

How to show a xml as a svg in IE?

Sean Li
Ranch Hand

Joined: Feb 27, 2002
Posts: 154
a strange question. yes it is.
I got a xml file contains the data, and a xsl file convert the data into svg graph. and it successfully done, I can see the result in develop tools such as Xselerator. a beautiful and simple svg graph.
however, how can I show it in IE? when I open this xml file with IE, it's just nothing. I think the IE just take the xml file as a xml file instead of a svg.
do you know what i mean? hope you can and hope can get help from you.
any reply is appreicated.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
IE needs a plugin that knows how to handle documents with the SVG mime type -- otherwise it treats it as any XML.
I found these two from the W3C SVG Implementations page:
Corel SVG Viewer
Adobe SVG Viewer


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Sean Li
Ranch Hand

Joined: Feb 27, 2002
Posts: 154
however, the fact is, i have installed the svg viewer from adobe. i don't know why.
Balaji Loganathan
author and deputy
Bartender

Joined: Jul 13, 2001
Posts: 3150
Originally posted by Sean Li:
however, the fact is, i have installed the svg viewer from adobe. i don't know why.

The adobe SVG viewer is only SVG image viewer, it will NOT convert the XML to SVG using XSL and display it on the screen.
For your case, it is better if u pre-generate the SVG using your 'processor' and show it using IE(which inturns uses SVG viewer plugin).


Spritle Software Blogs
Sean Li
Ranch Hand

Joined: Feb 27, 2002
Posts: 154
so if I want to use xsl to convert xml to generate dynamic svg output, what can i do? I cannot just generate it by hand. help me. pls!
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Do you have access to any server-side programming technologies?
Sean Li
Ranch Hand

Joined: Feb 27, 2002
Posts: 154
do you mean using Java? I know Java, but never used it to do such stuff. would you tell me how? thank you!
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Java is one of many languages/environments able to perform XSL transformation (you could also do it with ASP, ASP.NET, PHP, CGI, what not).
Take a look at these references for how to do XSLT in Java:
http://www.oreillynet.com/pub/d/838
http://xml.apache.org/xalan-j/samples.html#servlet
http://www.xml.com/pub/rg/137
http://www.tutorgig.com/searchtgig.jsp?query=XSL+Java
If you'd prefer having a resource for offline learning, I can recommend Eric Burke's Java and XSLT.
Sean Li
Ranch Hand

Joined: Feb 27, 2002
Posts: 154
Thank you, mate. your documentation is so helpful.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to show a xml as a svg in IE?
 
Similar Threads
SVG Components
Need info on SVG Viewer
Generating ER diagram from XML file.
FOP and SVG Files
Converting SVG to PDF