Question with passing XML to a target ASP


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Question with passing XML to a target ASP

  1. #1
    bennett Guest

    Question with passing XML to a target ASP


    In my project I build an XML string in an ASP from parameters a user inputs.
    I then want the XML from the user input to go to a ASP target file that
    instantiates a class object I have built in VB. I would do this in ASP but
    I would like it precompiled. Anyway, I am attempting to pass the XML to
    another ASP target file that basically instantiates a XML class... The target
    file code appears as:

    <%@ LANGUAGE=VBScript %>
    <!-- #INCLUDE VIRTUAL="/includes/errHandler.asp" -->
    <% Response.ExpiresAbsolute = "1/1/1980"
    set oExport = Server.CreateObject("myExport.clsExport")
    oExport.CreateLog=true
    oExport.ProcessXML
    set oExport = nothing
    %>

    How do I pass my XML string from the ASP page that builds it and then call
    the target ASP that instantiates my object? Sorry for the long email and
    thanks in advance.

  2. #2
    BenW Guest

    Re: Question with passing XML to a target ASP


    Bennett,

    Well there are a few methods that you can use to pass the XML string to the
    other ASP page, these are the ones I know. If anybody knows any other ways
    i would be interested, as this is a problem of all ASP/Web applicaiotns:

    1. You could save the XML to a file. SO the data is persisted and can be
    used at a later date. Not sure if u want to keep the XML for later, but the
    FileSystemObject should do the trick.

    2. You could save the string or the file toa database. If you are using SQL-Server
    2000 it is even easier, i think, as it has inbuilt T-SQL statments for XML.
    Or SQL could hold the location of the file you saved in the point above.

    3. If you dont want to save it you could just sen the send as a hidden paramter
    on a form.A bit cumbersome, but gets the job done.

    4. Or you perist the XML string in a Session Object (shock horror!). If the
    string is not too long you could get away with this.

    5. You could use a favourite of mine, Remote Scripting. This allows parametrs
    to be passed to functions, without the need for a page refresh. So you could
    send your XML string to an ASP file, instantiate the class, do your stuff
    on it, return whatever you wanted, all without doing a refresh. It looks
    really nice as well. I used it for a zip code lookup. When the user entered
    there zip code, it was sent to an ASP file that loaded a C++ dll , that looked
    in a database, that returned the users address. All without leaving the current
    ASPpageand without a page refresh.

    Hope these ideas help

    Ben






    "bennett" <bennett@waveshift.com> wrote:
    >
    >In my project I build an XML string in an ASP from parameters a user inputs.
    > I then want the XML from the user input to go to a ASP target file that
    >instantiates a class object I have built in VB. I would do this in ASP

    but
    >I would like it precompiled. Anyway, I am attempting to pass the XML

    to
    >another ASP target file that basically instantiates a XML class... The

    target
    >file code appears as:
    >
    ><%@ LANGUAGE=VBScript %>
    ><!-- #INCLUDE VIRTUAL="/includes/errHandler.asp" -->
    ><% Response.ExpiresAbsolute = "1/1/1980"
    >set oExport = Server.CreateObject("myExport.clsExport")
    >oExport.CreateLog=true
    >oExport.ProcessXML
    >set oExport = nothing
    >%>
    >
    >How do I pass my XML string from the ASP page that builds it and then call
    >the target ASP that instantiates my object? Sorry for the long email and
    >thanks in advance.



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