1 Reply Latest reply on Jan 29, 2008 4:49 PM by JR "Bob" Dobbs-qSBHQ2

    encode a file

    Level 7

      I have to pass an XML file via URL and I need to encode the XML file which
      contains a HTML page.
      this is what i have but i'm getting errors..

      <cfset xmlFile = "
      <MessageType>Guest Message</MessageType>

      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      " http://www.w3.org/TR/html4/loose.dtd">
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <title>Untitled Document</title>
      <link href="style.css" rel="stylesheet" type="text/css">

      <script language="javascript1.1" src="custom.js"></script>
      <script language="javascript1.1" src="hbx.js"></script>

      <table width="400" height="460" border="0" cellpadding="0" cellspacing="0">
      <td width="400" height="20" colspan="3"></td>
      <tr height="420">
      <td width="10" height="420"></td>
      <td align="left" valign="top" class="message_body" width="413"
      <!-- TYPE GOES HERE -->
      <center><b>'welcome </i>!</b></center><br>

      <td align="left" valign="top" class="message_body" width="23"
      <td width="400" height="20" colspan="3"></td>




      <A HREF =
      " http://xx.xxx.xx.xx/ShowMsg?msg=<cfoutput>#URLEncodedFormat(xmlfile)#</cfou
      tput>">Click me</A>

      Invalid CFML construct found on line 12 at column 25.
      ColdFusion was looking at the following text:


      The CFML compiler was processing:

      * an expression beginning with "\"", on line 3, column 19.This message
      is usually caused by a problem in the expressions structure.
      * a cfset tag beginning on line 3, column 3.

      The error occurred in

      10 : <FullMessage>
      11 : <![CDATA[
      12 : <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
      13 : " http://www.w3.org/TR/html4/loose.dtd">
      14 : <html>

      i'd apprecate some assicant.
      can i encode the xml file and then call it in the url?

      thanks in advance!