Hi Steve,
I imagine you probably understood better
from Dirk's sage response, but just in case...
Suppose I had a table called Books. Two records
might look like:
Author: John L. Viescas
Title: Building Microsoft Access Applications
ISBN: 0-7356-2039-3
Pub: Microsoft Press
Edition: 2005
Author: Ken Henderson
Title: The Guru's Guide to Transact-SQL
ISBN: 0-201-615760-2
Pub: Addison-Wesley
Edition: 2000
At its very basic, XML is a markup language
that will allow you to produce your hierarchy of
records using beginning and ending tags
(which *you* can define).
It might be loosely analogous with you setting
up headers and footers in an Access report.
In our example, we might define the "header and
footer" tags for a book record as
<book>
</book>
then within each book "header/footer" tag set, we use similar
tags for each fieldname within the record and the field
values go between those tags. At its simplest form,
our XML file might look like:
<book>
<Author>John L. Viescas</Author>
<Title> Building Microsoft Access Applications</Title>
<ISBN> 0-7356-2039-3</ISBN>
<Pub> Microsoft Press</Pub>
<Edition> 2005</Edition>
</book>
<book>
<Author>Ken Henderson</Author>
<Title> The Guru's Guide to Transact-SQL</Title>
<ISBN> 0-201-615760-2</ISBN>
<Pub> Addison-Wesley</Pub>
<Edition> 2000</Edition>
</book>
In your export, it looks like the
process chose to use your query
name for the "header/footer" tags
of a record
<QryExportWOOnSelectedShowDate>
......
......
</QryExportWOOnSelectedShowDate>
I am not an XML expert. It gets a lot more
complicated when you throw in powerful
namespaces, style sheets, and formatting,
but a "well-formed" XML file all starts with
the basics above.
good luck,
gary
{I probably should not have confused
things by using "header" in my original
response...sorry}
"PC Datasheet" wrote:
Thanks for your response! Dirk Goldgar (who also responded to this thread)
pointed me to the Application,ExportXML method in AccessXP. I used it to
export a query to XML. Now I may sound a little like I know what I am
talking about but it's a facade. I created a routine to export a series of
queries to XML. It worked; the files were in the specified folder but I
know nothing else about XML. So you ask what I would expect to "header" a
record in my xml... I can't answer that because I do no know what you are
speking about. What does it mean to "header" a record?
Thanks again, Gary!
Steve
"Gary Walter" <ga**********@nospamwamego.net> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
"PC Datasheet" wrote: AccessXP in 2000 mode.
I am running a procedure using Application.ExportXML. The XML file
begins with:
<?xml version="1.0" encoding="UTF-8" ?>
- <dataroot xmlns:od="urn:schemas-microsoft-com:officedata">
- <QryExportWOOnSelectedShowDate>
and I get the following between each record's data:
<QryExportWOOnSelectedShowDate>
-<QryExportWOOnSelectedShowDate>
Does anyone know if there is a way to prevent these entries in the XML
file so all the file contains is data?
Hi Steve,
One small part of my job is to take University
Line Schedule data and print a report to a pdf
file. I use pdf995 which allows adding Bookmarks
after report has printed if they are in a "xml" file
which is not "well-formed."
As I print the report, I save Page number,
College, and Dept in a table.
I then run a function that writes this data
to the "xml" file in form they require by
opening a file for output, cycling through
a recordset to table above, and printing
lines to the file.
So...it's not difficult to "do-it-yourself."
If you'd like, I could post the code, but
the "form" of the output is specific to
pdf995 bookmarks.
I'm curious though as to how you would expect to
"header" a record in your xml....
gary