Re: Coldfusion 9 XML creation and HTML after

2011-05-13 Thread Russ Michaels

can you post the code here
http://pastebin.com/

http://pastebin.com/

On Fri, May 13, 2011 at 5:43 PM, Ken Hammond khamm...@saleminc.com wrote:


 Here is what I am running into.  I have a web form that takes in the info I
 need.  I process the form on the next page and it creates an XML document
 that I need (which is being created successfully).  I need to display
 something back to the end user telling them it's been created.  After my
 end
 tag /cfprocessingdirective if I write any text it throws back the errors
 that there is something after that end tag...  How do I create my XML
 document and still display something back to the end user (or if need be,
 use a cflocation to get them to an acknowledgement page?

 The error that comes back in a red box:

 This page contains the following errors:

 error on line 26 at column 1: Extra content at the end of the document
 Below is a rendering of the page up to the first error.


 Ken



 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344502
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Coldfusion 9 XML creation and HTML after

2011-05-13 Thread Dave Watts

 Here is what I am running into.  I have a web form that takes in the info I
 need.  I process the form on the next page and it creates an XML document
 that I need (which is being created successfully).  I need to display
 something back to the end user telling them it's been created.  After my end
 tag /cfprocessingdirective if I write any text it throws back the errors
 that there is something after that end tag...  How do I create my XML
 document and still display something back to the end user (or if need be,
 use a cflocation to get them to an acknowledgement page?

You can't output both XML and HTML within a single HTTP response.
Well, you can, but the client won't know what to do with it. If you
need to generate XML, that typically isn't going to be returned
directly to the browser, because the browser won't know what to do
with it.

So, you will have to take a slightly different approach. There are a
couple of ways you could go. You could notify the user before
generating the XML, then redirect the user to the XML generation. Or,
you could generate the XML and store it in a variable or file, then
allow the user to click a link to generate the appropriate XML
response.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or on

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344503
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: Coldfusion 9 XML creation and HTML after

2011-05-13 Thread Anene Isioma Wealth

my guess is that you have answered your question by saying that you could use a 
cflocation tag.

Alternatively, if you trust your xml scrip to always create the xml document 
without errors, you may use a prompt to display your activity status just 
before 
you use the xml script.

 Best Regrads, 
Chuka I.W. Anene
Chief Software Eng./CEO
Quorium Solutions 
www.quorium.org
+234 70 3269 6113
+234 80 9530 7257

+234 1 881 2777






From: Ken Hammond khamm...@saleminc.com
To: cf-talk cf-talk@houseoffusion.com
Sent: Fri, May 13, 2011 4:43:44 PM
Subject: Coldfusion 9 XML creation and HTML after


Here is what I am running into.  I have a web form that takes in the info I 
need.  I process the form on the next page and it creates an XML document 
that I need (which is being created successfully).  I need to display 
something back to the end user telling them it's been created.  After my end 
tag /cfprocessingdirective if I write any text it throws back the errors 
that there is something after that end tag...  How do I create my XML 
document and still display something back to the end user (or if need be, 
use a cflocation to get them to an acknowledgement page?

The error that comes back in a red box:

This page contains the following errors:

error on line 26 at column 1: Extra content at the end of the document
Below is a rendering of the page up to the first error.


Ken 





~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344505
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: Coldfusion and XML

2004-05-07 Thread Tony Weeg
look @ cfsavecontent to create the xml.

maybe look @ cfhttp to make the call to the server to get the xml generated?

maybe look @ using a cfmx webservice, and have the browser on the touch
screen make a request to the webservice.

some ideas?
tony

-Original Message-
From: David Ashworth [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 07, 2004 9:27 AM
To: CF-Talk
Subject: Coldfusion and XML

Forgive me if this is a very stupid question or in some way wrong,

 
However,

 
I think I need to send an XML feed back to a client from the server, the
client machine is a touch screen that will remotely make a call to, I think,
a file on our webserver that will run a query on the database and return the
results - which I believe have to be in the form of an XML Feed.

 
Is this possible, can someone give me some pointers?

 
Thanks,

 
Dave
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: Coldfusion and XML

2004-05-07 Thread Nick de Voil
Dave

 I think I need to send an XML feed back to a client from the server, the
 client machine is a touch screen that will remotely make a call to, I
 think, a file on our webserver that will run a query on the database and
 return the results - which I believe have to be in the form of an XML
 Feed.

Not stupid or wrong but certainly possible - the touch screen can contain a
link to a ColdFusion template which generates an XML document.

Nick
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: Coldfusion and XML

2004-05-07 Thread Thomas Chiverton
On Friday 07 May 2004 14:37 pm, Tony Weeg wrote:
 look @ cfsavecontent to create the xml.

Why not use the proper XML types and functions CF gives you ?

-- 
Tom Chiverton 
Advanced ColdFusion Programmer

Tel: +44(0)1749 834997
email: [EMAIL PROTECTED]
BlueFinger Limited
Underwood Business Park
Wookey Hole Road, WELLS. BA5 1AF
Tel: +44 (0)1749 834900
Fax: +44 (0)1749 834901
web: www.bluefinger.com
Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple
Quay, BRISTOL. BS1 6EG.
*** This E-mail contains confidential information for the addressee
only. If you are not the intended recipient, please notify us
immediately. You should not use, disclose, distribute or copy this
communication if received in error. No binding contract will result from
this e-mail until such time as a written document is signed on behalf of
the company. BlueFinger Limited cannot accept responsibility for the
completeness or accuracy of this message as it has been transmitted over
public networks.***
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Coldfusion and XML

2004-05-07 Thread David Ashworth
Thanks for the tips so far

 
Can this be done using CF5 as opposed to MX?

 
Thanks,

Dave

-Original Message-
From: Thomas Chiverton [mailto:[EMAIL PROTECTED] 
Sent: 07 May 2004 15:55
To: CF-Talk
Subject: Re: Coldfusion and XML

On Friday 07 May 2004 14:37 pm, Tony Weeg wrote:
 look @ cfsavecontent to create the xml.

Why not use the proper XML types and functions CF gives you ?

-- 
Tom Chiverton 
Advanced ColdFusion Programmer

Tel: +44(0)1749 834997
email: [EMAIL PROTECTED]
BlueFinger Limited
Underwood Business Park
Wookey Hole Road, WELLS. BA5 1AF
Tel: +44 (0)1749 834900
Fax: +44 (0)1749 834901
web: www.bluefinger.com
Company Reg No: 4209395 Registered Office: 2 Temple Back East, Temple
Quay, BRISTOL. BS1 6EG.
*** This E-mail contains confidential information for the addressee
only. If you are not the intended recipient, please notify us
immediately. You should not use, disclose, distribute or copy this
communication if received in error. No binding contract will result from
this e-mail until such time as a written document is signed on behalf of
the company. BlueFinger Limited cannot accept responsibility for the
completeness or accuracy of this message as it has been transmitted over
public networks.*** 
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: Coldfusion and XML

2004-05-07 Thread Dave Watts
 Can this be done using CF5 as opposed to MX?

You can generate XML with CF 5 by either generating raw text that happens to
be well-formed XML, or by using a third-party XML parser to generate XML for
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]




Re: ColdFusion and XML

2004-04-16 Thread Howard Fore
What kind of encoding? Do you mean that the XML document you posted is 
the value of a form element, a textarea for instance, and you'd like to 
access the data in the XML document?

--
Howard Fore, Web Developer, Professional Career Development Institute
[EMAIL PROTECTED], 770-729-8400, x5258

On Apr 16, 2004, at 7:42 AM, chad wrote:

 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?
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: ColdFusion and XML

2004-04-16 Thread chad
I am not sure what type of encoding. The Xml I get has this.

?xml version=1.0 encoding=ISO-8859-1?
- Original Message - 
From: Howard Fore 
To: CF-Talk 
Sent: Friday, April 16, 2004 8:11 AM
Subject: Re: ColdFusion and XML

What kind of encoding? Do you mean that the XML document you posted is 
the value of a form element, a textarea for instance, and you'd like to 
access the data in the XML document?

--
Howard Fore, Web Developer, Professional Career Development Institute
[EMAIL PROTECTED], 770-729-8400, x5258

On Apr 16, 2004, at 7:42 AM, chad wrote:

 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?
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: ColdFusion and XML

2004-04-16 Thread Douglas.Knudsen
if you are passing this in a form var, ala input type=hidden name=myXML value=?xml version=1.0 encoding=IS.blah blah this is going to bomb.Have to mind your ticks and quotes.For quick approach that may get you by, us value='?xml version=1.0 encoding=IS.blah blahOrvalue=?xml version='1.0' encoding='IS.blah blah

 
Doug

-Original Message-
From: chad [mailto:[EMAIL PROTECTED]
Sent: Friday, April 16, 2004 8:52 AM
To: CF-Talk
Subject: Re: ColdFusion and XML

I am not sure what type of encoding. The Xml I get has this.

?xml version=1.0 encoding=ISO-8859-1?
- Original Message - 
From: Howard Fore 
To: CF-Talk 
Sent: Friday, April 16, 2004 8:11 AM
Subject: Re: ColdFusion and XML

What kind of encoding? Do you mean that the XML document you posted is 
the value of a form element, a textarea for instance, and you'd like to 
access the data in the XML document?

--
Howard Fore, Web Developer, Professional Career Development Institute
[EMAIL PROTECTED], 770-729-8400, x5258

On Apr 16, 2004, at 7:42 AM, chad wrote:

 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? 
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: ColdFusion and XML

2004-04-16 Thread Dave Watts
 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]




RE: ColdFusion and XML

2004-04-15 Thread Paul Kenney
How did you encode the XML?

Paul Kenney
[EMAIL PROTECTED]
916-212-4359 

 -Original Message-
 From: chad [mailto:[EMAIL PROTECTED]
 Sent: Thursday, April 15, 2004 6:33 AM
 To: CF-Talk
 Subject: ColdFusion and XML
 
 
 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?
 
 
 
 
 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: ColdFusion and XML

2004-04-15 Thread chad
This is the xml I am receiving. This xml is not generated by me. It is being sent to me via a form. My cfm page handles the xml that comes in. 

?xml version=1.0 encoding=ISO-8859-1?
upload table=INVOICE franid=000 password=8
 record
FranID000/FranID
InvoiceID18647/InvoiceID
CustomerID12952/CustomerID
NumGarments0/NumGarments
DryCleaning0/DryCleaning
Laundry0/Laundry
Alterations3/Alterations
ShoeRepair0/ShoeRepair
Other0/Other
DescrOther/DescrOther
Surcharge0/Surcharge
Discount0/Discount
TotalSale3/TotalSale
Tax0/Tax
Total3/Total
 /record
/upload

- Original Message - 
From: Paul Kenney 
To: CF-Talk 
Sent: Thursday, April 15, 2004 1:06 PM
Subject: RE: ColdFusion and XML

How did you encode the XML?

Paul Kenney
[EMAIL PROTECTED]
916-212-4359 

 -Original Message-
 From: chad [mailto:[EMAIL PROTECTED]
 Sent: Thursday, April 15, 2004 6:33 AM
 To: CF-Talk
 Subject: ColdFusion and XML
 
 
 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?
 
 
 
 
 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]