View Single Post
Old 08-12-2010, 09:50 AM  
tauchviesch
Junior Member
 
Join Date: Aug 2010
Posts: 1
Default Use XSLT processor to transform FlashFXP to FileZilla format

Hi,

just wanted to share, what solved this problem for me flawlessly. I found the following code over at the FileZilla-Forum:

Code:
<!-- MASC 2008.11.29 -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:output method="xml" indent="yes"/>
   <xsl:template match="/SITES">
      <FileZilla3>
         <Servers>
            <xsl:for-each select="SITE">
               <xsl:sort select="GROUP" order="ascending"/>
               <xsl:apply-templates select="."/>
            </xsl:for-each>         
         </Servers>
      </FileZilla3>
   </xsl:template>
   
   <xsl:template match="SITE">
      <Server><xsl:value-of select="@NAME"/>
         <Host><xsl:value-of select="ADDRESS"/></Host>
         <Port><xsl:value-of select="PORT"/></Port>
         <Protocol>0</Protocol>
         <Type>0</Type>
         <User><xsl:value-of select="USERNAME"/></User>
         <Pass><xsl:value-of select="PASSWORD"/></Pass>
         <Logontype>1</Logontype>
         <TimezoneOffset>0</TimezoneOffset>
         <PasvMode>MODE_DEFAULT</PasvMode>
         <MaximumMultipleConnections>0</MaximumMultipleConnections>
         <EncodingType>Auto</EncodingType>
         <BypassProxy>0</BypassProxy>
         <Name><xsl:value-of select="@NAME"/></Name>
         <Comments><xsl:value-of select="NOTES"/></Comments>
         <LocalDir />
         <RemoteDir><xsl:value-of select="REMOTEPATH"/></RemoteDir>         
      </Server>
   </xsl:template>
</xsl:stylesheet>
Use the above XSL with any XSLT-Processor to transform the exported FlashFXP to FileZilla format.
tauchviesch is offline