asp to xml sheet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fary4u
    Contributor
    • Jul 2007
    • 273

    asp to xml sheet

    Hi

    i'm trying to find some code that can genrate asp result to xml sheet

    My xml version is <?xml version="1.0" encoding="utf-8" standalone="yes "?>

    [CODE=asp]
    <%
    response.Conten tType = "text/xml"
    set conn=Server.Cre ateObject("ADOD B.Connection")
    conn.provider=" Microsoft.Jet.O LEDB.4.0;"
    conn.open server.mappath( "/db/database.mdb")s ql="select fname,lname from tblGuestBook"
    set rs=Conn.Execute (sql)response.w rite("<?xml version='1.0' encoding='ISO-8859-1'?>")
    response.write( "<guestbook >")
    while (not rs.EOF)
    response.write( "<guest>")
    response.write( "<fname>" & rs("fname") & "</fname>")
    response.write( "<lname>" & rs("lname") & "</lname>")
    response.write( "</guest>")
    rs.MoveNext()
    wendrs.close()
    conn.close()
    response.write( "</guestbook>")
    %>
    [/CODE]

    thanks in advance
  • DrBunchman
    Recognized Expert Contributor
    • Jan 2008
    • 979

    #2
    Hi Fary4u,

    I've tested your code and the xml content doesn't display in IE. In FireFox however it works fine! Can you give that a try please and let me know if it works for you also?

    I'll try and look into this one a bit further.

    Dr B

    Comment

    • jhardman
      Recognized Expert Specialist
      • Jan 2007
      • 3405

      #3
      you should be able to validate your XML with the W3C, just to make sure there are no errors.

      Jared

      Comment

      • DrBunchman
        Recognized Expert Contributor
        • Jan 2008
        • 979

        #4
        Fary4u, did you ever get this fixed? I'd be interested to know what the problem was if you did.

        If not, did you ever try it in FireFox?

        Best Regards,

        Dr B

        Comment

        • Fary4u
          Contributor
          • Jul 2007
          • 273

          #5
          Yep i've done it & getting record from the database write xml sheet before saving it into the database.

          it's working fine there was no problem i'm using this wd Flash components to access records 1 after another.

          Comment

          Working...