Simple XML Example

Discussion in 'ASP General' started by James Baker, Aug 19, 2004.

  1. James Baker

    James Baker Guest

    I have a very simple query that gets a few records from a database. I need
    to take this, turn it into XML and post it to a client's website via
    VBScript. I was able to find an example of exporting the data to an XML
    file, but I'm lost on the syntax for actually posting the data to a third
    party page. I'm sure this is simple, can someone provide me with an
    example? Thanks!

    Relevant code currently is:

    Response.ContentType = "text/xml"

    Dim ObjADORS
    Const adPersistXML = 1

    Set ObjADORS = Server.CreateObject("ADODB.Recordset")

    'FileNumber, ClientFileNo, StatusDate, StatusTime, StatusComment
    ObjADORS.Open "SELECT FormType, Description FROM FormTypes",
    "DSN=kasecure1;uid=sa;pwd=pcbs"

    ObjADORS.Save "c:\inetpub\wwwroot\manager\Test.xml", adPersistXML

    ObjADORS.Close
    Set ObjADORS = Nothing
     
    James Baker, Aug 19, 2004
    #1
    1. Advertising

  2. James Baker wrote:
    > I have a very simple query that gets a few records from a database.
    > I need to take this, turn it into XML and post it to a client's
    > website via VBScript. I was able to find an example of exporting the
    > data to an XML file, but I'm lost on the syntax for actually posting
    > the data to a third party page.


    I'm not sure I quite undersatnd what you mean by this, but, does either of
    these two examples help?
    http://www.davidpenton.com/testsite/tips/

    Bob Barrows

    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
     
    Bob Barrows [MVP], Aug 19, 2004
    #2
    1. Advertising

  3. James Baker

    James Baker Guest

    I'll take a look, thanks for the links. To clarify, all I'm trying to do is
    generate XML from a recordset and "send" it from an ASP page to a client's
    website, where they can interpret it however they want. Does that make
    sense?


    "Bob Barrows [MVP]" <> wrote in message
    news:...
    > James Baker wrote:
    > > I have a very simple query that gets a few records from a database.
    > > I need to take this, turn it into XML and post it to a client's
    > > website via VBScript. I was able to find an example of exporting the
    > > data to an XML file, but I'm lost on the syntax for actually posting
    > > the data to a third party page.

    >
    > I'm not sure I quite undersatnd what you mean by this, but, does either of
    > these two examples help?
    > http://www.davidpenton.com/testsite/tips/
    >
    > Bob Barrows
    >
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.
    >
    >
     
    James Baker, Aug 19, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. VB Programmer

    Example needed: simple XML file and parsing

    VB Programmer, Jan 6, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    795
    Craig Deelsnyder
    Jan 6, 2004
  2. Milsnips
    Replies:
    3
    Views:
    431
    Milsnips
    May 23, 2005
  3. Grace Tsai
    Replies:
    3
    Views:
    733
    Peter Flynn
    Apr 1, 2005
  4. Mich
    Replies:
    6
    Views:
    456
    Sherm Pendley
    Apr 8, 2007
  5. Erik Wasser
    Replies:
    5
    Views:
    465
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page