Command Reference Guide > Command Reference Guide > Using Ingres Commands > genxml Command--Export Tables Into XML Format
Was this helpful?
genxml Command--Export Tables Into XML Format
The genxml utility allows bulk transfer of Ingres data from an Ingres database into XML format. This allows Ingres data on the web to communicate with other third party products.
The generated XML documents refer to generic Ingres DTD (Document Type Definition). Ingres DTD is a controlled document describing the Ingres data. DTD can be internal or external.
When the genxml command is executed on an Ingres database, an XML file is generated, containing the metadata and the data for the tables in XML format, as specified by the Ingres DTD (Document Type Definition). A DTD file is also generated by genxml by default, unless other options are specified.
For external DTDs, the dtd file can be printed in the same directory as the XML file. Alternatively, external DTDs can be a referenced in the XML file to the DTD location. This location will be either a URL or a static location, such as $II_SYSTEM/ingres/files/ingres.dtd. Reference to the Ingres DTD is made using the DOCTYPE declaration in the generated XML file.
You can use the generated XML file as input to the xmlimport utility for importing into another Ingres installation. For details, see xmlimport Command--Import XML Data into Ingres.
Note:  genxml output is not encrypted. To protect sensitive data, encrypt the genxml output files as needed.
The genxml command has the following format:
genxml dbname | vnode::dbname[/server_class] [-uuser] [-P] [-GgroupID]
[-dest=dir] [-xmlfile=filename] [-dtdfile=filename] [-metadata_only]
[-internal_dtd] [-referred_dtd] [{tablename}] [title_doctype=title]
dbname
Specifies the name of the database being exported. Also specifies the vnode and server_class, if required, as described in Standard Flags and Parameters.
-uuser
Specifies the effective user for the session, as described in Standard Flags and Parameters
-P
Specifies the password if the session requires one.
-Ggroupid
Specifies a group identifier, as described in Standard Flags and Parameters.
-dest=dir
Specifies the destination directory into which the XML file is generated. An empty dirname specification (“.”) denotes the current directory. The generated Ingres DTD is also placed in this directory.
-xmlfile=filename
Specifies the name of the output XML file. By default, the file is called xmlout.xml.
-dtdfile=filename
Specifies the name of the output dtd file. By default, the file is called ingres.dtd.
-metadata_only
Indicates to print the metadata information only.
-internal_dtd
Prints the DTD inline inside the XML doc.
-referred_dtd
Places a reference to the ingres.dtd in Ingres files directory ($II_SYSTEM/ingres/files).
tablename
Specifies the table name or names that the user wants the XML to output. Table names must be separated by spaces. If omitted, all tables are copied. The table name can be qualified with a valid schema name in the format schema.tablename, as described in Schema Qualifier--Specify Ownership).
Note:  No more than 100 objects can be specified. This limit can be raised by modifying the utexe.def file. For more information, see the Database Administrator Guide.
-title_doctype=title
Changes the doctype or the document name of the XML file. The default doctype is IngresDoc. Use this flag with caution. If the document name is changed, the referred_dtd option should not be used because the referred generic Ingres DTD in $II_SYSTEM/ingres/files has IngresDoc as document type.
Last modified date: 08/28/2024