POV-Ray : Newsgroups : povray.newusers : xml-file converting to Povray? : Re: xml-file converting to Povray? Server Time
29 Jul 2024 02:20:28 EDT (-0400)
  Re: xml-file converting to Povray?  
From: Manuel Mata
Date: 1 Dec 2006 13:25:00
Message: <web.45707281fa762727e8c4c6630@news.povray.org>
"Kitty" <kit### [at] microsoftcom> wrote:
> Hi,
>
> I have a xml-file describing some buildings in 3D and I wanted to ask if
> there exist a possibility to convert or to import this file into Povray. I
> would like to render this xml-file with Povray. Is this possible, is there a
> software able to convert xml-files to Povray? Or what other thing could I
> do?
>
> Thanks for your help!!

Well, there is a very hard coded way to do it. You can use XSL to transform
your XML file into any text format like povray SDL, but it is hard. For
example, if you have this line into your XML file:

<box width="2" height="4" length="3"/>

You can use an XSL stylesheet like this

<xsl:template match="box">
box{0 <<xsl:value-of select="width"/>,<xsl:value-of
select="height"/>,<xsl:value-of select="length"/>>}
</xsl:template>

Then you need a tool like Xalan (free and made with Java) and it would
convert it in this SDL line.

box{0 <2,4,3>}

I know this is hard, but is another way ...

         See ya.
         www.mmata.org


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.