Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2012
    Posts
    3

    Exporting XML elecments and attributes within a single tag

    Hello. I'm new to the forum as well as new to MS Access. However, I've been working with databases for years.


    If someone could point me in the right direction, I would be extremely grateful.

    My Question...
    Does anyone know if there is a way that I can control the output of XML presentation during exportation from Access 2007?

    I am attempting to export XML so that each element (Primary Key) and it's attributes are within a single tag, as per the example below.
    I have a "Packages" table, with the following columns... "PackageID", "PackageName", "Revision", "Reboot", "Priority" and "Execute".
    When I export the table from MS Access 2007, it appears as follows...

    <Packages>
    <Package_ID>javar6.3</Package_ID>
    <PackageName>Java 6.3</PackageName>
    <Revision>1.0</Revision>
    <Reboot>false</Reboot>
    <Priority>999</Priority>
    <Execute>once</Execute>
    </Packages>

    Below is exactly what I'm trying to accomplish...

    <Packages>
    <Package_ID="javar6.3" PackageName="Java 6.3" Revision="1.0" Reboot="false" priority="999" execute="once" />
    </Packages>

    Any information would be greatly appreciated, as I've tried looking this up using Google, but I can't seem to find much information.

    Thank you very much in advance.
    I look forward to reading your replies

  2. #2
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    I don't do much with XML, but I think you are talking of attributes vs elements.

    see this link for more info.

    If you don't get an answer here, you may try the xml forum
    on Tek-Tips

    see http://www.tek-tips.com/threadminder.cfm?pid=426

  3. #3
    Join Date
    Dec 2012
    Posts
    3
    Thanks orange!
    I appreciate the reply.
    I'll be sure to take your recommendation and check out the XML forum on "tek-tips".
    Thanks again!

  4. #4
    Join Date
    Dec 2012
    Posts
    3
    After performing some research, I found an acceptable answer and I decided to post it here, just in case anyone else is ever looking for something similar.
    This issue has less to do with Microsoft Access and more to do with XML stylesheets, aka XSL/XSLT.

    With that said, you can provide an XSL stylesheet, along with your XML file (which I will be outputting from MS Access) to describe the organization/presentation of your XML data.

    Check out this link for more details...

    http://stackoverflow.com/questions/2...f-a-single-tag

    And, thanks again for pointing me in the right direction

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 08-05-2011, 10:59 AM
  2. Exporting single query and single report.
    By rfhall50 in forum Programming
    Replies: 2
    Last Post: 02-18-2011, 12:08 PM
  3. Exporting data from single fields
    By Kipster1203 in forum Import/Export Data
    Replies: 1
    Last Post: 08-06-2010, 10:02 AM
  4. attributes out of order
    By Dornenhexe in forum Queries
    Replies: 9
    Last Post: 07-12-2010, 02:36 PM
  5. Excel exporting in single cells
    By Paolo29011982 in forum Import/Export Data
    Replies: 0
    Last Post: 07-29-2009, 04:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums