XML query - 16388

Hi I am new to using XML, and have a bit of an issue. How do I define
how the XML file looks when I export a query from Access?

9/12/2007 6:50:47 AM
access 16762 articles. 3 followers. Follow

4 Replies

Similar Articles

[PageSpeed] 55

On Sep 12, 4:50 pm, rmorri...@davislangdon.com.au wrote:
> Hi I am new to using XML, and have a bit of an issue. How do I define
> how the XML file looks when I export a query from Access?

XML is a markup language:


That means, it is a plain text file, it uses tags.

When you export a query from Access 2003  to XML, several files with
different purpose can be generated.

1. A file with .xml extension - this is a data file, tagged so that
the data has structure. You can look at it, but it is not presentable
like an Access Report or a grid like Excel / datasheet.

2. A file with .xsd extension - this is a schema file that describes
what the fields are, what type of data is in those fields.

3. A file with a .xsl extension. - this is a programming language file
- it contains layout skeleton in HTML and vbscript chunks. This file,
if it is fed to an engine that understands it, will take the .xml file
and produce a HTML webpage.

4. A file with a .htm extension - this is a combined file which
contains stuff from the .xsl file and the .xml file. It is intended to
be opened by Internet Explorer and will then IE will digest this
content and display a rough looking grid.

All four files can opened by notepad since they are plain text files
and you can see the plumbing of the files.

Discuss more?


9/12/2007 8:29:02 AM
Thanks for the response. I need to export data from a query with a
particular structure for a website update. I have managed to export
the query to an .xml file, but the structure isn't right. How do I
tell Access what the structure should be?

9/12/2007 10:19:13 PM
On Sep 13, 8:19 am, rmorri...@davislangdon.com.au wrote:
> Thanks for the response. I need to export data from a query with a
> particular structure for a website update. I have managed to export
> the query to an .xml file, but the structure isn't right. How do I
> tell Access what the structure should be?

The structure of the .xml file and the schema in the .xsd file are
preset by Access (I guess).

It is very common for people who work with XML files to carry out
transforms from one structure to another structure. Obviously a crude
transformation is possible with manual and persistent programming but
a higher level transformation (as you can see in the .xsl file and
the .htm file that is generated) can be done with XSLT programming.

There are lots of XSLT books and references and there are lots of XSLT
engines / programming tools that a programmer can use to carry out the
transform. Since XML is a W3C initiative, many of this info and tools
are even free or widely described on the web.

If you are not a programmer, then you need to look for an end user XML
transformation tool - I can't at the moment put my finger on a cheap,
desktop end user tool that does this for someone who is not a

9/13/2007 2:00:42 AM
Hi just saw your inquiry on the MS access help and figured that I would help 
you out. I had the same problem. The following is the command

Application.ExportXML _
    ObjectType:=acExportQuery, _
    DataSource:="QueryName", _
    DataTarget:="Where you want the file to go" & "\FileName" & ".xml" 
    Application.TransformXML _
    DataSource:="Where the file is currently located" & "\FileName"  & 
".xml", _
    TransformSource:="\Location of your XSL file" & "\Name of your XSL file" 
& ".xsl", _
    OutputTarget:="Where you want to export your data to " & "\The Name of 
the New File" &  ".xml"

Please not the XSL file must match the data source.

Good luck
armele look

"rmorrison@davislangdon.com.au" wrote:

> Thanks for the response. I need to export data from a query with a
> particular structure for a website update. I have managed to export
> the query to an .xml file, but the structure isn't right. How do I
> tell Access what the structure should be?
11/5/2007 5:51:01 PM

Similar Artilces:

IMF Updates and custom scoring via MSExchange.UceContentFilter.xml
Regarding the new IMF update process (KB907747), Just so I understand my role here or maybe someone has a different interpretation of the KB article or (better yet) a workaround. The notes would seem to indicate that with every update I need to copy my MSExchange.UceContentFilter.xml file into the newly created folder of ..\bin\MSCFv2\<IMF update version> for my custom keywords to be integrated into the IFM scoring process. No registry setting I can just create and have my .xml file exist in one location and have all updates use it? Thanks Don It indicates you need to copy it to t...

Web Query and Line Break <BR> tags
Hi there, I have a problem that I have seen come up a few times in searching through the archives, but I have not been able to find a solution (if there is one). I have a project that I believe an Excel Web Query would be perfect for, except for one small problem. When I run a Web Query against a website to pull in a table, and in that table one of the cells has multiple lines separated by <BR> tags, Excel puts the multiple lines into separate cells. The ideal situation would be for it to use the <td> tags as cell delimiters, not the <br> tags. Can anyone think of any cl...

Query for change in Responsibility
Hello, I am trying to create a query and can not get it correct! I am trying to do a select query on one table using access 2000. I am trying to look back one record in order to make a decision on the record I am processing. I am not highly skilled at SQL, so this may be trivial to some. EXAMPLE: Table: 1112223333,01/01/2006,James 1112223333,01/02/2006,James 1112223333,01/03/2006,James 1112223333,01/04/2006,James 1112223333,01/05/2006,James 4445556666,01/01/2006,Bob 4445556666,01/02/2006,Bob 4445556666,01/03/2006,Bob 4445556666,01/04/2006,Ralph 4445556666,01/05/2006,Ralph 7778889999,01/01/...

XPath query problem.
Hi. I'm trying to locate one node in the following XML: <?xml version="1.0" encoding="utf-8" ?> <ROUTINES> <ROUTINE name="TA14"> <METHOD name="1"> <DEBET> <SUBROUTINE name="1401"></SUBROUTINE> <SUBROUTINE name="1402"></SUBROUTINE> <SUBROUTINE name="1408"></SUBROUTINE> </DEBET> <CREDIT> <SUBROUTINE name="1403"></SUBROUTINE> <SUBROUTINE name="1404"></SUBROUTINE> <...

Query, between, Null, IF, And .........UGH
I have a query that is looking at 3 dates, Ticket date, Issue Date, and Return date. I want to know if the Ticket Date falls between the Issue and Return dates. My problem is with entries with Null Return Dates. I want the query to look at Null Return dates as Now or grater. This is the expression I have come up with so far but it doesn’t work. Between [Date issued] And (If(IsNull([Date Returned])),Now()) Try this: Between [Date issued] And IIf([Date Returned] Is Null, Now(), [Date Returned]) -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http:...

crosstab query problem
I use MSO2K. When i create a new crosstab query using the wizard, none of the fields are getting listed in the tables. Similar problem I find with Unmatched query wizard also. I have used both these wizards in the past on the same system. Unable to recall anything which has been done on the system which could have caused this problem. I have to do a Detect and Repair operation. Problem still persists. Any inputs on what could the problem be? Thanks Ramesh Ive seen this happen before as well, certain fields just refuse to show up in the wizards (seemingly always the one...

Multiple Criteria in a query
I have a query with several fields that I need to pull out certain information from. The fields are all expiration dates for various items. I need to show all data <= certain dates, but unless all fields meet the criteria the query comes back blank. Thanks, it worked. "Pendragon" wrote: > If you require all fields to meet the criteria, then use <= SpecificDate on > the same row for all fields in the criteria section. If you want all data if > ANY of the fields meet the criteria, then each instance of the criteria needs > to be on a separate row - notice...

Form from a query
I made a select query that draws data from 2 tables and designed a form to show this data but it wont populate I dont know what I did wrong. Im trying to show client ID (Autonumber) and First and Last names (Text)from 1 table and client needs (several Y / N checkboxes) from 2nd table I have linked the client ID fields in both tables as they are the primary keys. Im using ACCESS 2003 First go to the Relationship window and join the two tables with Referential Integrity enabled. If it won't enable, fix the problem records. Next create a form based on the first table. On thi...

Query related to .chm file
Hi I am using a .chm file for showing Help in my application. There are several pages in my chm file. Every time the user clicks the help button the <introduction> page is opened every time. I want different pages to open under different circumstances. For example there is a help button on 2-3 dlg boxes. Now for these dialog boxes i want different page to be opened when <Help> button is pressed from different dlg boxes. How can i do this? Waiting for suggestions Regards Davinder. Davinder, > I am using a .chm file for showing Help in my application. > There are seve...

xml problems with dotnet1.1
Hi List I have developed a small app reading xml files using dotnet1.0. Now I changed to dotnet1.1. The Problem is with Dotnet1.1 the Method OuterXml from class XmlDocument returns the xml string in another format. In Dotnet1.0 the returned string looks like "<TAG ELEMENT='1'>DATA</TAG>" In Dotnet1.1 the returned string looks like "<TAG ELEMENT=\"1\">DATA</TAG>" Can I change back to output from Dotnet1.0 using Dotnet11, or is there any other workaround??? regards Bj�rn Hi Bj�rn, How did the original document look like? A...

MC++ & C# generate different XML
Hi, I've been trying a long time now to generate some XML using MC++ and XmlSerializer. I have a piece of C# code that produces exactly what I want, but I simply can't get the MC++ code to write the same thing. Below I have included two minimal compilable samples that illustrate my problem. The C# code produces this XML: <?xml version="1.0" encoding="utf-8"?> <LandXML xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Units name="unit1" /> <Units name="un...

Sign Xml
Hi, I would like send an user a license certificate which is in xml file. It is ok that they can read it they are just not allowed to change it. I have tried to sign my xml document using the SignedXml class and the RSACryptoServiceProvider to create the key and that works fine. But I guess that the user just can remove the signed part, change the doucment and resign it. How can I check for that? The client is a consumer product which is beeing distributed to multiple locations. Thanks Henrik. Hi Henrik, The RSA algorith uses a key pair for encryption and signing. The SignedXml is d...

XML Serialization problem ( ver.2)
Hi folks! I have some XML Serialization problem. I searched Internet and found some good info but still can't resolve the problem. I have next situation: I have solution contains 2 projects: Proj1 and Proj2. Each project compiled to dll. In Proj1 contains Class1 And Proj2 contains Class2. Now, Class2 has reference to Class1. I want to XML serialize Class2. In order to do that I added attr: [XmlInclude(typeof(Class1))] before Class2 definition. It's compiled but when it's running it throws exception something like that: "File or assembly name Proj1, or one of its dependenc...

Help Editing an XML File
Greetings, This is my first post and I am hoping (praying) someone could help me. I am not a programmer, I just know enough to be dangerous. I have a custom application someone developed for me that generates an XML file to display web pages. Following is a very small portion of an example file: <QLabel>Position</QLabel><QText>Which one of the following best describes your primary job function?</QText><RotationValue>0</RotationValue> <LastOnPage>false</LastOnPage> I want to modify the XML file so that the web pages are displayed in Sp...

XML into DataSet
Hi. I need some help. I have an xml file what will contain hundreds of groups and will have an associated xsd. My overall goal is to have a web application that allows a user to input a groupID from a webform, the application will than find that groupID in the xml file and display all the related information for that group only. I have read my xml into a DataSet and have been able to successful find groupID and display some of the information for that particular group. But I have been unable to navigate to the groupsItems node and subsequently the details of each groupItem found in gro...

Business Portal Query Problems
I installed Business Portal for a client some time last fall. Since that time, the site has not been used, but I know when I installed it, it worked fine. As of today, I can't seem to get anything to load correctly. For example, I go to the vendor list, and it says "Query found no results." I know that there are vendors. We have the Human Resources Self Service Suite installed, and I can see the employees, but when I click to see pay informaiton, I receive the message "Query found no results." Can you give me an idea of where to start to troubleshoot this is...

Combining an update query with a parameter query
I wanted to know how you can update data in a table using the update query and a parameter query. How did you want to run this update query? In query design, you can just put your parameter in the query. To run it programmatically, you can then use RunSQL in a macro or code. A better programmatic approach might be to build the SQL statement in code, concatenating the parameter value into the string. Then Execute the string itself: you don't need a saved query. The advantage is that you know whether it worked or not. Here's an example: Action queries: suppressing dialogs, whi...

How can you generate an Excel file from a query that has parameter
In Access 2007, I am currently using the following code to generate an excel file from a normal select query and it work fine. In my code, I am building parts of the statement based on data that is stored in tables. "s" = a string that represents the name of the query "p" = a concatenated string that represents the files Path, files Name, and files extention DoCmd.OutputTo acOutputQuery, s, acFormatXLS, p, False My question is what would the code be if the query needed to have parameters passed in? Can anyone help me with this? Here'...

Create a string from a query result to add into sendObject
Hi! I am trying to create a string to enter as the "To" argument for sendObject in Access 2000. I want to create this string based on several different query results. I have one table that contains the email addresses for several different people in different departments (i.e. Sales, IT, Finance). I would like to use queries to filter out the seperate departments and create a string (i.e. strSales) that will include all of the individuals from the query. To illustrate, I create a parameter query to filter all of the email addresses I have stored for Sales. The query results wou...

Opening xml file in excel
Hello, When a xml file is opened in excel, a dialog is displayed asking [to open with stylesheet or do not open with stylesheet]. When the file is opened in vb this dialog is not shown. How to open a xml file in vb applying the stylesheet. thanks Menon ...

Reading XML file with Linq
Hi, I have an Xml file with this structure: <Root> <Total name="A"> <Item name="B"> <Donald>AAAA</Donald> <Donald>BBBB</Donald> <Donald>CCCC</Donald> <Donald>DDDD</Donald> </Item> <Item name="C"> <Donald>EEEE</Donald> <Donald>FFFF</Donald> <Donald>GGGG</Donald> </Item> ...

Query expression...
I am currently using 'Weekday: DatePart("w",[Wdate])'. Can the actual day Mon, Tues, etc. be displayed? hi, On 10.03.2010 18:17, 116 wrote: > I am currently using 'Weekday: DatePart("w",[Wdate])'. Can the actual day > Mon, Tues, etc. be displayed? Use Format(): Format(Now(), "ddd") or Format(Now(), "dddd") mfG --> stefan <-- can't you use format([Wdate], "ddd") ? "116" wrote: > I am currently using 'Weekday: DatePart("w",[Wdate])'. Can the actual da...

How to use schema validate xml file?
I have created my schema format(xxx.xsd) for my xml files, but how can I use it validate my xml files? "Knighterrant" <knighterrant@mop.com> wrote in message news:O5o9lmTrFHA.3264@TK2MSFTNGP12.phx.gbl... >I have created my schema format(xxx.xsd) for my xml files, but how can I >use it validate my xml files? private void Validate(string path) { XmlValidatingReader valReader = null; try { valReader = new XmlValueLengthValidatingReader(new StreamReader(path)); valReader.ValidationType = ValidationType.Schema; // to validate according to schema, not defined in xml file ...

delete query question
I have a database for tracking equipment repair requests. Each shift, if they have a problem with a piece of equipment, will enter a "concern" into the database. If both shifts have the same problem then a request for "countermeasure" is created. I have created a select query which brings the two shifts' concerns together if they are the same. This query comes up on a form to show the users what concerns need to be submitted for countermeasure request. The form writes the concerns to another table. Once these concerns are written to this new table, I want to delet...

Query for Reports- Sort by condition, leave blank to include all
I am making reports where I would like to use queries to include only those with specific conditions (in the criteria box) as chosen by the user in the ChooseReport form. What I would like to do is have the query include all records when the condition is left blank. For example, on a sort by status the user could input "open" or "closed" or all by leaving it blank (or by choosing an option if that is what I need to do). But the principle point is that they could have those three options by using the same button. Thank you Hi Quick answer (there are many) Priva...