DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: saving xml to a file

  1. #1
    rperez Guest

    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>


  2. #2
    Red Dragon Guest

    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>
    >



  3. #3
    David Stevenson Guest

    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>
    >



  4. #4
    Chris Guest

    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>
    >>

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center