Extract Data as XML

From DBArtisan
Jump to: navigation, search

Go Up to Available object actions by DBMS

This function allows you to take SQL data, extract it, and make it available as XML data. The XML Editor Filter allows you to pick and choose among columns and designate rows and then creates the For XML statement that enables the operation. The resulting XML document is created and presented in an active XML Editor. At this point the document can be saved in XML format.

Caution: To use the Extract Data as XML feature in Sybase ASE, you must first purchase and install an XML Services license from Sybase.

Platform Availability

To Open the XML Editor Filter

  1. Initiate an Extract Data as XML action against a table. For more information see Initiating an object operation.
    An XML Editor Filter dialog opens.
  2. In the Columns area, select the check boxes corresponding to the columns with data you want to extract.
  3. Optionally, in the Where box, type a WHERE clause to qualify the records that will be extracted.
    Note: As you select options, inspect the Select box to verify the query you are creating.
  4. Use the table below as a guide to understanding and specifying the optional DBMS-specific settings in this dialog:
DBMS Setting or group Description

Sybase ASE

Refer to Sybase online documentation for details onXML mapping information. For assistance, see Accessing Third Party Documentation.


Row Set Tag

Identify the XML element name you want to use to replace the Row Set tag.

Row Tag

Identify the XML element names you want to use to replace the Row tag.

Max Rows.

The maximum number of rows to fetch

SQL Server

XML Mode

AUTO mode returns query results as nested XML elements. For any table in the From clause with a column in the Select clause, it is represented as an XML element. When you select RAW mode, each row in the query result set is transformed into an XML element with the generic row identifier. The XML attribute name will be the same as the column name for non-null columns.

XML Options

XML DATA specifies that an XML data schema will be returned. ELEMENTS specifies that columns will be returned as subelements--otherwise they are mapped to XML attributes. This is an option only if AUTO is selected. When BINARY BASE64 is selected, any binary data is encoded in base-64 format. You must specify this option in RAW mode. It is the default for AUTO.

5. When ready, click OK. An XML representation of the extracted data opens in an XML editor.