Ask a Question related to Coldfusion - Getting Started, Design and Development.

  1. #1

    Default generate xml file

    Hello Everyone,

    I would like te generate an xml file with coldfusion
    Would this be the way to go about it?:

    <cfsavecontent variable = "test">
    <content>
    <goup>
    <item title="titel1" thumb="thumb.jpg" foto="foto.jpg" />
    <item title="titel1" thumb="thumb.jpg" foto="foto.jpg" />
    <item title="titel1" thumb="thumb.jpg" foto="foto.jpg" />
    <item title="titel1" thumb="thumb.jpg" foto="foto.jpg" />
    </group>
    </content>
    </cfsavecontent>
    <cffile action="write" file="foto.xml" output="#test#">

    I thought this ought to work, but it seems it doesn't.

    Any suggestions?

    Thanks!

    Yannovich Guest

  2. Similar Questions and Discussions

    1. How to generate PDF file from HTML file using Acrobat API's
      Hi, I want to generate a PDF file from an HTML file on server side(C# .Net). Their is a COM interop called "AcrobatWeb2PDF" availaible but could...
    2. how to generate a vrml file in director?
      i try to find a way to make movements in a *.w3d file and record them into a file that i can import into my 3D app. for example to generate...
    3. Can't generate a .ps file
      Mac OS 9.2.2 G4 Acrobat 5.05 Adobe PS Driver 8.7 & 8.8 Adobe Illustrator 9.2.2 I'm trying to generate a .ps file from an Illustrator doc. I've...
    4. use php to generate excel file
      is it possible to use php to generate excel document? I want to use it to dynamically generate sales report that can be downloaded from my website....
    5. Generate csv file from sql table
      I am looking to do the following from a C# ASP.Net applicatio 1. Generate a DS from a SQL pull of a single table. Once I have pulled the data...
  3. #2

    Default Re: generate xml file

    The code is correct and will generate an XML file. When you say it
    does not work, can you be more specific.


    If it is just a reading issue, add xml header to your code.

    <cfsavecontent variable = "test"><?xml version="1.0" encoding="UTF-8"?>



    Yannovich wrote:
    > Hello Everyone,
    >
    > I would like te generate an xml file with coldfusion
    > Would this be the way to go about it?:
    >
    > <cfsavecontent variable = "test">
    > <content>
    > <goup>
    > <item title="titel1" thumb="thumb.jpg" foto="foto.jpg" />
    > <item title="titel1" thumb="thumb.jpg" foto="foto.jpg" />
    > <item title="titel1" thumb="thumb.jpg" foto="foto.jpg" />
    > <item title="titel1" thumb="thumb.jpg" foto="foto.jpg" />
    > </group>
    > </content>
    > </cfsavecontent>
    > <cffile action="write" file="foto.xml" output="#test#">
    >
    > I thought this ought to work, but it seems it doesn't.
    >
    > Any suggestions?
    >
    > Thanks!
    criticalim@hotmail.com Guest

  4. #3

    Default Re: generate xml file with cf file

    XML documents need a valid XML processing directive as the first line of the file.

    Something like this:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    Kronin555 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139