2 Replies Latest reply on Mar 28, 2008 3:55 AM by Günter Schenk

    Customize XML export format

      I am using the Export Recordset as XML from the developer toolbox.  I have it working great but I need to be able to add attributes to the RowNode during the export that includes a column from the XML Export.  Currently it looks like this:  <br /><br />$xmlExportObj->addColumn("address", "address");<br />$xmlExportObj->setRowNode("location");<br /><br />which produces this:  <br /><location><br />address>8086 Queen Palm Ln #315 Fort Myers, FL 33966-6443</address><br /><br />I need the xml to look like this:<br /><br /><location address="701 first street, Sunnyvale, CA"><br /><br />How do I do this?
        • 1. Re: Customize XML export format
          I use database functions to format the data. For instance, if I want to format a date:

          SELECT date_format(mydate,'%d/%m/%Y') as newdate FROM mydb.

          The Export to XML feature will create a 'newdate' node instead of 'mydate'.

          There are many functions included in MySQL that allow you to format the data to meet your requirements.

          I hope this helps.
          • 2. Re: Customize XML export format
            Günter Schenk Level 4
            Hi,<br /><br />-----<br />I need the xml to look like this:<br /><br /><location address="701 first street, Sunnyvale, CA"><br /><br />How do I do this?<br />-----<br /><br />just select "export columns as: Attributes" in the Advanced tab<br /><br />Cheers,<br />Günter Schenk<br />Adobe Community Expert, Dreamweaver