Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2005
    Posts
    183

    Unanswered: Import XML - why multiple tables?

    Apparently I don't "get it" when it comes to Access and XML.

    I have an XML file for a company, that essentially contains cars, and what people are assigned to these cars, and when I import it to Access, it creates a [Cars] table with the makes, models and years of the cars and [Team member] table with first name, sur name and cell phone number, but there's no link between them.

    In Excel I would at least have a way to keep things together after imporitng.

    Code:
    Toyota, Celica, 2001, Michael, Dunson, 5557777
    Toyota, Celica, 2001, Nick, Telsey, 5558888
    Mazda, 828, 2008, Lee, You, 5559999
    Mazda, 828, 2008, Kim, Che-Gy, 5551111
    In Access I get two unrelated tables... *panic*

    Code:
    Cars:
    Toyota, Celica
    Mazda, 828
    
    Team-members:
    Michael, Dunson, 5557777
    Nick, Telsey, 5558888
    Lee, You, 5559999
    Kim, Che-Gy, 5551111
    Any help is more than welcome,

    Trin
    IT squid: networks, servers, firewalls, routers and I dabble a little with SQL-server and Access as well....

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    what does the original XML look like?
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Where did the XML come from? Seems like the XML is incomplete.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  4. #4
    Join Date
    Oct 2005
    Posts
    183
    The XML files are usually generated by sql-server, but essentially it could come from any sort of system.

    Its a pretty straightforward XML file.

    I'll post a file in a few hours. Right now I'm heading for a meeting (gag).

    Cheers, Trin
    IT squid: networks, servers, firewalls, routers and I dabble a little with SQL-server and Access as well....

  5. #5
    Join Date
    Oct 2005
    Posts
    183

    Example

    I've attached a small sample XML file, limited to two cars and their crews.

    As stated in the first post. Import in Excel, and the relations between cars and crews is maintained, in Access, cars and crews are imported to two individual tables with no relations.

    Thanks for any help

    Cheers, Trin
    Attached Files Attached Files
    IT squid: networks, servers, firewalls, routers and I dabble a little with SQL-server and Access as well....

Posting Permissions

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