Page 1 of 2 12 LastLast
Results 1 to 15 of 26
  1. #1
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    XML capabilities in Access (Access 2003 SP2)

    Where would I look to find out the XML capabilities in Access?

    I need to access a web site using XML? Can this be done from Access?

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: XML capabilities in Access (Access 2003 SP2)

    I don't understand the question, Pat. What do you mean by "access a web site using XML"? You generally store and retrieve data or information in XML, you don't use it to access anything.
    Charlotte

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: XML capabilities in Access (Access 2003 SP2)

    Thanks for responding Charlotte.

    I meant to say, how do I send and retrieve data using XML from Access?

    Is there a reference I can read to establish how I can do this?

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: XML capabilities in Access (Access 2003 SP2)

    XML is just another format you can use to import and export data - like TXT or XLS.

    See Work with XML in Microsoft Access 2003 about using XML interactively, or Using the XML Features of the Access 2003 Object Model about using it in VBA.

  5. #5
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: XML capabilities in Access (Access 2003 SP2)

    I need to do this using VBA as I need this to be automatic. I have had a look at the VBA option and am not sure I can use it. I need to input the XML of a webpage given a URL. There is a import from an XML file so I would need to get the contents of a web page into a file first. This is the part I don't know how to do.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: XML capabilities in Access (Access 2003 SP2)

    That doesn't sound like an Access question. What is "the XML of a web page" anyway?

  7. #7
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: XML capabilities in Access (Access 2003 SP2)

    My terminology is not right I know.

    What I need to do is to open a IE instance (if that's what you call it) with a URL and then I need to import the contents of that web page.

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: XML capabilities in Access (Access 2003 SP2)

    'Fraid I cannot help you with that. Sorry.

  9. #9
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: XML capabilities in Access (Access 2003 SP2)

    Thanks anyway Hans. I'll just keep on trying to find how to do this.

  10. #10
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: XML capabilities in Access (Access 2003 SP2)

    What contents of the web page? Web pages contain all sorts of things. Are you trying to extract data only? Can you fill in the blanks here? You don't ordinarily try to retrieve a web page.
    Charlotte

  11. #11
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Salem, Oregon, USA
    Posts
    219
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: XML capabilities in Access (Access 2003 SP2)

    Patt,
    I've begun a reply to you and quit about 2 times, so, 3rd time's a charm. Basically, I don't have any help to give except that I _think_ it could be done.

    About 4 years ago I just tested it for fun, to see if I could access a URL website and input the contents of the web page. I could -- although, it was not formatted at all so what I imported would not have been useable. It was just a "see what happens if I try this" thing. With an xml page, you would need a style sheet or formatting and whatever else associated files comes along with the xml data page to give that data some "rules,"
    Hmm, I just happened to check Access XP help, and there in black and white is the topic (well, blue and white) is "About importing XML data" -- so, check out your Access help! there are associated files with the xml import, though.
    thx
    Pat

  12. #12
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: XML capabilities in Access (Access 2003 SP2)

    Patt

    It seems to me that you have two different issues to deal with here.

    * How to automatically download and save a file given its url, and
    * How to import a file in xml format into access.

    The thread that includes <post#=319,030>post 319,030</post#> is about download and importing a text file. I suspect that the download part is much the same whatebver the file type involved.

    Once you have downloaded the file , you need to import it. I have not done this, but I see (in help) that there is an ImportXML Method. It looks to me that this will make a new table from the import, so you could then run an append query to put the stuff where you want it.

    Added by John
    I have just tried this and using the URLDownloadToFile function I was able to download the xml file using the URL you have posted.

    When I then added just this line of code it automatically imported it into a new table called runners.
    Application.ImportXML strFile, acStructureAndData
    Where I had previously used strfile as the name of file to save the download to..
    Regards
    John



  13. #13
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: XML capabilities in Access (Access 2003 SP2)

    Pat,

    It happens that the URL you posted does indeed take you to a page displaying XML code, but that isn't exactly the norm, which is why I asked further questions. John has suggested an approach to this that should work. Just don't get the idea that any web page is "written" in XML.
    Charlotte

  14. #14
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: XML capabilities in Access (Access 2003 SP2)

    Well done John, your searching is obviously far superior to mine, I was searching for XML rather than URL. Thanks to MarkD (I think that's who it was) for his code to import that URL's XML code.
    I will use Application.ImportXML next and see what I get. From what you have said it will work. This has saved me days maybe weeks of time.

    Thanks again John.

  15. #15
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: XML capabilities in Access (Access 2003 SP2)

    The web page was written that way intentionally so that punters could download the info they need rather than write screen scrapers.

Page 1 of 2 12 LastLast

Posting Permissions

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