saving xml to a file
a snippet of the code below: currently, the results when clicking the submit
button returns the results in xml format. ideally, i want to automatically
save the results to file on my hard drive. any suggestions? thanks in advance.
<FORM METHOD="POST" ACTION="https://secure.ibill.com/cgi-win/ccard/ccard.exe">
<INPUT TYPE="HIDDEN" NAME="LANGUAGE" VALUE="English">
<INPUT TYPE="HIDDEN" NAME="HELLOPAGE" VALUE="Default">
<INPUT TYPE="HIDDEN" NAME="REQTYPE" VALUE="secure">
<INPUT TYPE="HIDDEN" NAME="ACCOUNT" VALUE="xxxxxyyy">
<INPUT TYPE="submit" name="submit" value="Join Today">
</form>
[673 byte] By [
rperez] at [2007-11-9 15:26:38]

# 1 Re: saving xml to a file
Why not try JDOM for Java? It has a formatting class built in, so you could
send the results to your file through the formatter and you should be good
to go.
"rperez" <rperez@teleteam.net> wrote:
>
>a snippet of the code below: currently, the results when clicking the submit
>button returns the results in xml format. ideally, i want to automatically
>save the results to file on my hard drive. any suggestions? thanks in
advance.
>
><FORM METHOD="POST" ACTION="https://secure.ibill.com/cgi-win/ccard/ccard.exe">
><INPUT TYPE="HIDDEN" NAME="LANGUAGE" VALUE="English">
><INPUT TYPE="HIDDEN" NAME="HELLOPAGE" VALUE="Default">
><INPUT TYPE="HIDDEN" NAME="REQTYPE" VALUE="secure">
><INPUT TYPE="HIDDEN" NAME="ACCOUNT" VALUE="xxxxxyyy">
><INPUT TYPE="submit" name="submit" value="Join Today">
></form>
>
# 2 Re: saving xml to a file
I think you may need to set the HTTP Header Content-Disposition to "attachment;
filename="<yoursuggestedfilenamehere>".
This is how you get the browser to bring up the Open/Save As... dialog. This
asks the user for permission. You can't do it automatically, even with a
signed applet.
<a href="http://www.nacs.uci.edu/indiv/ehood/MIME/rfc2183.txt">RFC 2183</a>
David Stevenson
"rperez" <rperez@teleteam.net> wrote:
>
>a snippet of the code below: currently, the results when clicking the submit
>button returns the results in xml format. ideally, i want to automatically
>save the results to file on my hard drive. any suggestions? thanks in
advance.
>
><FORM METHOD="POST" ACTION="https://secure.ibill.com/cgi-win/ccard/ccard.exe">
><INPUT TYPE="HIDDEN" NAME="LANGUAGE" VALUE="English">
><INPUT TYPE="HIDDEN" NAME="HELLOPAGE" VALUE="Default">
><INPUT TYPE="HIDDEN" NAME="REQTYPE" VALUE="secure">
><INPUT TYPE="HIDDEN" NAME="ACCOUNT" VALUE="xxxxxyyy">
><INPUT TYPE="submit" name="submit" value="Join Today">
></form>
>
# 3 Re: saving xml to a file
Complete HTTP header based call to write file contents to local filesystem:
oResponse.AddHeader "Content-Type", strContentType 'eg: text/xml
oResponse.AddHeader "Content-Length", lngFileSize ' eg: 100000
oResponse.AddHeader "Content-Disposition", "attachment; FileName = "
& <yoursuggestedfilenamehere>
oResponse.AddHeader "Document", <yoursuggestedfilenamehere>
oResponse.AddHeader "Script_Name", <yoursuggestedfilenamehere>
"David Stevenson" <drs2@frontiernet.net> wrote:
>
>I think you may need to set the HTTP Header Content-Disposition to "attachment;
>filename="<yoursuggestedfilenamehere>".
>
>This is how you get the browser to bring up the Open/Save As... dialog.
This
>asks the user for permission. You can't do it automatically, even with a
>signed applet.
>
><a href="http://www.nacs.uci.edu/indiv/ehood/MIME/rfc2183.txt">RFC 2183</a>
>
>David Stevenson
>
>"rperez" <rperez@teleteam.net> wrote:
>>
>>a snippet of the code below: currently, the results when clicking the
submit
>>button returns the results in xml format. ideally, i want to automatically
>>save the results to file on my hard drive. any suggestions? thanks in
>advance.
>>
>><FORM METHOD="POST" ACTION="https://secure.ibill.com/cgi-win/ccard/ccard.exe">
>><INPUT TYPE="HIDDEN" NAME="LANGUAGE" VALUE="English">
>><INPUT TYPE="HIDDEN" NAME="HELLOPAGE" VALUE="Default">
>><INPUT TYPE="HIDDEN" NAME="REQTYPE" VALUE="secure">
>><INPUT TYPE="HIDDEN" NAME="ACCOUNT" VALUE="xxxxxyyy">
>><INPUT TYPE="submit" name="submit" value="Join Today">
>></form>
>>
>
Chris at 2007-11-11 23:31:56 >

