Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

WDDX Problem

Status
Not open for further replies.

TC2000

Programmer
Dec 28, 2000
32
0
0
HK
My source :


<cfhttp url='method='get'
resolveurl='no'></cfhttp>


<cfoutput>#HTMLEDITFormat(CFHTTP.FileContent)#</cfoutput>
<cfwddx action=&quot;WDDX2CFML&quot; input=&quot;#HTMLEDITFormat(CFHTTP.FileContent)#&quot; output=&quot;newq&quot; >

and got the following error :

XML parsing error: not well-formed (error code 4, line 11, column 0, buffer offset 25)


The error occurred while processing an element with a general identifier of (CFWDDX), occupying document position (16:1) to (16:87) in the template file C:\Inetpub\
 
Your xml file doesn't appear to be in true CFWDDX format. How did you make tv.cfm?
 
tleish,

This is my tv.cfm source :

<CFQUERY NAME='q' DATASOURCE='ihkinv'>
select CompanyID, MasterInKey, MAWB, HAWB from MasterIn where HAWB <> ' '
</CFQUERY>
<cfwddx ACTION='cfml2wddx' input=#q# >

Thanks
 
Here's the 2 things you need to do:

[ol]
[li]Take out <HTML> and <BODY> tags off of the beginning and ending of tv.cfm[/li]
[li]Take #HTMLEDITFormat()# off of you CFWDDX
<cfwddx action=&quot;WDDX2CFML&quot; input=&quot;#CFHTTP.FileContent#&quot; output=&quot;newq&quot;>
[/li]
[/ol]
- tleish
 
tleish ,

It is working now.
Thank.....

But I have a question ?
When are we going to use &quot; #HTMLEDITFormat()# &quot;
When I use #HTMLEDITFormat()# I got the WDDX format,
but without it, I only got the data without WDDX format structure....

 
You don't use it, unless you need to view &quot;<&quot; and &quot;>&quot; tags. It converts &quot;<&quot; and &quot;>&quot; to &quot;&lt;&quot; and &quot;&gt;&quot;

HTMLEditFormat Returns HTML escaped string. All carriage returns are removed from string, and all special characters (> < &quot; &) are escaped.

HTMLEDITFormat() changes:
<wddxPacket version='1.0'><header></header><data>
to:
&lt;wddxPacket version='1.0'&gt;&lt;header&gt;&lt;/header&gt;&lt;data&gt;&lt;

so that the &quot;<&quot; and &quot;>&quot; and the info between them can be seen in a browser. Otherwise an browser ignores any <tags> and only displays text outside of tags.

Try outputing your CFHTTP.FileContent with HTMLEDITFormat() and without it, look at the difference in the browser. Also, look at the source code of the html page to see the difference as well.
- tleish
 
hah! It looks like my code didn't make it past the parser. I did a preview before I posted it, anyway. Have of the &quot;<&quot; and &quot;>&quot; were supposed to be in the extended html character form. Oh well, I hope you get the idea.
- tleish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top