Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2003
    Posts
    3

    Question Unanswered: Generate XML data

    I am trying to generate an SVG graphic from information in my Access database. SVG is basically XML. Is there any way XML can be generated from an Access database?

  2. #2
    Join Date
    Mar 2003
    Location
    UK
    Posts
    71
    is your have the info in a table you can export the table to xml file format.

    right click on the table and select export.
    in the "save as type" box at the bottom select XML documents.
    click export.

    access will then create an xml file and xml schema for the table.

    hope this helps.

  3. #3
    Join Date
    Jun 2003
    Posts
    3
    Originally posted by emma_com
    is your have the info in a table you can export the table to xml file format.

    right click on the table and select export.
    in the "save as type" box at the bottom select XML documents.
    click export.

    access will then create an xml file and xml schema for the table.

    hope this helps.
    Well, I need it to be generated dynamically. I have an ASP application which needs to display the SVG from information entered by the user.

  4. #4
    Join Date
    Mar 2003
    Location
    UK
    Posts
    71

    ExportXML Method

    ExportXML Method
    See Also Applies To Example Specifics
    Exports data, schema, and/or presentation information for the specified Microsoft Access object as XML files.

    expression.ExportXML(ObjectType, DataSource, DataTarget, DataTransform, SchemaTarget, SchemaFormat, SchemaTransform, PresentationTarget, PresentationTransform, ImageTarget, LiveReportSource, Encoding, OtherFlags)

    expression Required. An expression that returns an Application object.

    ObjectType Required AcExportXMLObjectType. The type of Access object to export.

    AcExportXMLObjectType can be one of these AcExportXMLObjectType constants.
    acExportDataAccessPage
    acExportForm
    acExportFunction
    acExportQuery
    acExportReport
    acExportServerView
    acExportStoredProcedure
    acExportTable

    DataSource Required String. The name of the Access object to export. The default is the currently open object of the type specified by ObjectType.

    DataTarget Optional String. The file name and path for the exported data. If this argument is omitted, data is not exported.

    DataTransform Optional String. The name of the XSL file to apply to the data before it is written to the target file.

    SchemaTarget Optional String. The file name and path for the exported schema information. If this argument is omitted, schema information is embedded in the data document.

    SchemaFormat Optional AcExportXMLSchemaFormat. The format in which schema information is exported.

    AcExportXMLSchemaFormat can be one of these AcExportXMLSchemaFormat constants.
    acSchemaNone default
    acSchemaXSD

    SchemaTransform Optional String. The name of the XSL file to apply to the schema information before it is written to the target file.

    PresentationTarget Optional String. The file name and path for the exported presentation information. If this argument is omitted, presentation information is not exported.

    PresentationTransform Optional String. The name of the XSL file to apply to the presentation information before it is written to the target file.

    ImageTarget Optional String. The path for exported images. If this argument is omitted, images are not exported.

    LiveReportSource Optional String. Connection information for a report containing live data. This may be a reference to an .odc file or an XMLSQL request. This argument is ignored if ObjectType is not acExportReport.

    Encoding Optional AcExportXMLEncoding. The text encoding to use for the exported XML.

    AcExportXMLEncoding can be one of these AcExportXMLEncoding constants.
    acEUCJ
    acUCS2
    acUCS4
    acUTF16
    acUTF8 default

    OtherFlags Optional Long. A bit mask which specifies other behaviors associated with exporting to XML. The following table describes the behavior that results from specific values; values can be added to specify a combination of behaviors.

    Value Description
    1 Related tables Includes the "many" tables for the object specified by DataSource.
    2 Relational properties Creates relational schema properties.
    4 Run from server Creates an ASP wrapper; otherwise, default is an HTML wrapper. Only applies when exporting reports.
    8 Special properties Creates extended property schema properties.

    Remarks
    When the ExportXML method is called from within an Access object, the default behavior is to overwrite any existing files specified in any of the arguments. When the ExportXML method is called from within a data access page, the default behavior is to prompt the user before overwriting any existing files specified in any of the arguments.

    Example
    The following example exports the table called Customers in the current database as XML. The data and schema are exported as separate files, and the schema is in XSD format. Existing files are overwritten.

    Application.ExportXML _
    ObjectType:=acExportTable, _
    DataSource:="Customers", _
    DataTarget:="Customers.xml", _
    SchemaTarget:="CustomersSchema.xml", _
    SchemaFormat:=acSchemaXSD, _
    OtherFlags:=1

Posting Permissions

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