AnsweredAssumed Answered

Export to XML

Question asked by PeterBue on Dec 4, 2013
Latest reply on Dec 16, 2013 by PeterBue

Title

Export to XML

Post

     Hello Everyone,

     I'm trying to export fields from my database into an XML document. This XML document is being formatted using and XSL stylesheet. The output I'm getting when using this XSL is just plain text with an XML header at the top, and not all XML (Tags are missing).  Below is the XSL code. If anyone could tell me way it the output isn't XML I would appreciate it.

      

     <?xml version="1.0" encoding="ISO-8859-1"?>
     <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>
         <xsl:template match="row">
             <xsl:for-each select="ROW">
             <card id="42" effects="true">
                 <cells>
                     <cell position="A">
                         <asset></asset>
                         <caption></caption>
                     </cell>
                     <cell position="B">
                         <asset></asset>
                         <caption></caption>
                     </cell>
                     <cell position="C">
                         <asset></asset>
                         <caption></caption>
                     </cell>
                     <cell position="D">
                         <asset></asset>
                         <caption></caption>
                     </cell>
                 </cells>

                 <questions>
                     <question type="pick_1">
                         <text><xsl:value-of select="Pick1Question"/></text>
                         <answers><xsl:value-of select="Pick1Answer"/></answers>
                     </question>
                     <question type="pick_2">
                         <text><xsl:value-of select="Pick2Question"/></text>
                         <answers><xsl:value-of select="Pick2Answer"/></answers>
                     </question>
                     <question type="pick_3">
                         <text><xsl:value-of select="Pick3Question"/></text>
                         <answers><xsl:value-of select="Pick3Answer"/></answers>
                     </question>
                     <question type="solo_pick_1">
                         <text><xsl:value-of select="SoloPickQuestion"/></text>
                         <answers><xsl:value-of select="SoloPickAnswer"/></answers>
                     </question>
                     <question type="vote">
                         <text><xsl:value-of select="VOTING_QUESTION"/></text>
                         <answers></answers>
                     </question>
                 </questions>
             </card>
             </xsl:for-each>
         </xsl:template>
     </xsl:stylesheet>

Outcomes