|
Home > Online Product Documentation > Table of Contents > Example ExampleThis example shows how to define a DB-to-XML data source, and how DB-to-XML data sources interact with a relational database. Consider a DB-to-XML data source that performs a simple SELECT and INSERT. The SELECT StatementThe SELECT statement is defined on the SELECT tab of the DB-to-XML editor:
This SELECT statement returns every author record from the
The INSERT StatementThe INSERT statement is defined on the UPDATE tab of the DB-to-XML data source editor:
This INSERT statement attempts to insert the entire XML document content into table
Saving the FileAfter executing the query from the DB-to-XML data source editor, we examine the query results, which are rendered as XML in the Preview window. (See Figure 392 , for an example of how SQL/XML query results are displayed in Stylus Studio.) Checking the results allows us to verify that the table we are querying is providing us with the data we expect.
Once we have verified the query result, we save the
Opening the .rdbxml as XML
Next, we open the
When the DB-to-XML data source is opened in the XML editor, it looks just like any other XML document - it displays the XML returned when we executed the SQL/XML query. Other data source attributes (connection settings and the SQL/XML statements themselves) are not accessible or visible when a data source is opened as XML, but they are present as metadata. Updating the Data in the Database
To update the data from the
The document now contains a total of 26
Similarly, if we deleted all existing
|
Publishing & Printing
It is really hard to get things to look pretty, especially XML. That's why these publishing & printing companies use Stylus Studio to make a Mona Lisa out of data integration. Check out these top companies that are "stunning" with Stylus Studio!
WSDL Editor
WSDL Editor featuring a graphical WSDL viewer, syntax help, Java Web Service code generation and more. Simplify Web Services development with Stylus Studio's Web Service Description Language (WSDL) Editor today!
Generate XSD
Stylus Studio® can generate an industry standard W3C XSD (or DTD) by correctly inferring an XML data model from an XML instance document.
EDIFACT Sample Converted to XML
A sample EDIFACT document before and after conversion to XML, showing markup and full automatically-generated internal documentation.