automating export of XML

Dylan Snyder

Registered User.
Local time
Today, 12:43
Joined
Dec 31, 2007
Messages
89
Is there any way to automate the export of an object from Access in XML Format? Is XML Supported in SendObject? tHanks in advance for your help
 
We are on 2003
 
i ended up explicitly generating an xml file by writing print statments, based on iterating a recordset
 
2007 does have a function:

Code:
Function SiteMaptoXML()
Dim WebFile As String
WebFile = GetImageDir & "sitemap.xml"
Const CREATE_REPORTML = 16
Application.ExportXML _
ObjectType:=acExportReport, _
DataSource:="Site Maps Search", _
DataTarget:=WebFile, _
OtherFlags:=CREATE_REPORTML
End Function

Simon
 
Last edited:
thanks,
It may be time to upgrade. I'll try Gemma-the-husky's idea first, though. The days of our Department being on access are numbered, anyway. I would just allow the user to export using the menu commands, but I always feel scared allowing users to see anything other than the switchboard, reports, and forms.
 
thanks for your help.

now, I just realized that I don't know anything about schemas and getting XML exported files in a certin format. I hunted on the forum, but could not find any good tutorial on getting started. Does anyone know of the top of their head the definitive "exporting XML from Access for dummies" Thread or tutorial?
 
all i did was got a well formed xml file of the type i wanted to end up with - and then wrote a module to generate one

i think it was recursive, as you cant generate the end tag until you generate the content of that tag.


this sort of logic

Code:
sub generatexml(node)

produce opentag
  for each childnode
     generatexml(childnode0
  next
produce closetag

end sub
 
Last edited:

Users who are viewing this thread

Back
Top Bottom