> I generated a cfm page that process a xml document that
> is submitted in a form. The problem is the XML document
> is encoded and it causes my cfm page to error out. Does
> anyone know how to decode an encoded xml page?
By default, when you submit an HTML form with METHOD="POST", the data sent
to the server is URL-encoded. Basically, any characters not allowed in a URL
are escaped with their corresponding escape sequences. Spaces, for example,
are replaced with plus signs or "%20". Normally, the server can easily
decode that, so you don't have to worry about it.
XML contains lots of stuff you can't put in a URL, and I imagine CF is
simply getting confused about how to decode it. There's an IE-specific
character encoding issue described here:
http://www.biglist.com/lists/xsl-list/archives/200305/msg01144.html
You do have some options, though. One option would be to use the
GetHTTPRequestData function to return a structure containing the various
parts of the HTTP request, and go through the "content" key and manually
decode characters as appropriate. Another option might be to specify
ENCTYPE="text/xml" instead of using the default
ENCTYPE="application/x-www-urlencoded" within your HTML form tag. I will
note that I don't know how well either of these options would work, but
that's where I'd start if I were you.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- ColdFusion and XML chad
- RE: ColdFusion and XML Paul Kenney
- ColdFusion and XML chad
- Re: ColdFusion and XML Howard Fore
- RE: ColdFusion and XML Douglas.Knudsen
- Coldfusion and XML Dave Watts
- Coldfusion and XML David Ashworth
- RE: Coldfusion and XML Tony Weeg
- Re: Coldfusion and XML Thomas Chiverton
- RE: Coldfusion and XML David Ashworth
- Re: Coldfusion and XML Nick de Voil
- RE: Coldfusion and XML Dave Watts