Results 1 to 5 of 5

Thread: Xml

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2001
    Posts
    3

    Cool Xml

    Someone knows (or can give me an example) how to pass a recordset between two tiers (DLLs) using XML. I did it but using ADO Recordsets, and the problem is that I have to have installed ADO in both machines.

    Thanks so much for your coments.
    DaMo

  2. #2
    demirc
    Guest
    You can
    a - pass it as a XML obj (using MS XML parser) or stream

    or

    b - pass it as a string

    I guess the question is how the receiving end is gonna process the info, since if you use option

    a - then you will need a XML parser on the other end
    b - you will need to parse the string your self (code and code and more code)

    But If you want to see more about the option 'a', I'll dig in to my archives, and try to come up with a sample.

  3. #3
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Just use MSXML parser. All you have to do is load it into a DOM object, and traverse the tree structure from there. MSXML object hiearchy is pretty easy to manipulate and if you need any help, just give a shout back.

  4. #4

    Thread Starter
    New Member
    Join Date
    Oct 2001
    Posts
    3
    Thank you so much for your help. Do you know where I can find an example. I have installed the XML parser and I saw an example of how to read it, but it will be nice to manipulate a Recordset between tiers and send the information as XML. Thanks again.
    DaMo

  5. #5
    WALDO
    Guest
    VB Code:
    1. Dim adoRS AS New ADODB.Recordset
    2. Dim adoStr AS New ADODB.Stream
    3. Dim objXML AS New MSXML2.DOMDocument
    4.  
    5. 'Get your Recordset however
    6.  
    7. 'Save it to the stream object
    8. Call adoRS.Save(adoStr, adPersistXML)
    9.  
    10. 'Now you have the XML extracted from the recordset
    11. 'and placed in the stream object
    12.  
    13. Debug.Print adoStr.ReadAll
    14.  
    15. 'You can just pass that as a string or load it into a XML
    16. 'DOM Document
    17.  
    18. objXML.loadXML(adoStr.ReadAll)
    19.  
    20. 'Now you can pass the whole object and the XML has
    21. 'been parsed into objects for you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width