Using the URL Builder

The URL Builder utility lets you connect to a relational database server, select a table or view, and render that object as an XML document. You can use this feature, implemented on the URL Builder tab of the Open dialog box, to open a new XML document anywhere in Stylus Studio - in the XML Editor, the XQuery and XSLT Mappers, and so on.

Figure 320. URL Builder Tab of the Open Dialog Box

In this section

This section covers the following topics:

Compared to DB-to-XML Data Sources

Using the URL Builder is similar to using DB-to-XML data sources, though the URL Builder does have a few characteristics that distinguish it from DB-to-XML data sources.

  • The URL Builder does not expose SQL/XML. You cannot write SQL/XML queries using the URL Builder.
  • The URL Builder allows you to select only a single table or view from the relational database server. You cannot select mutiple tables, views, or individual rows using the URL Builder.
  • The URL Builder does not allow you to save XML documents back to the relational database server.

When to Use

Use the URL Builder any time you want to quickly render an entire table or view as XML. Any time you need more control - writing your own SQL/XML or updating the relational database, for example - use a DB-to-XML data source. See Overview of DB-to-XML Data Sources for more information.

Connection Settings

Connection settings for the URL Builder are the same as those used to define a DB-to-XML data source:

  • Database type
  • Server URL
  • Username
  • Password

See Specifying Connection Settings for more information.

How to Open a Table or View as an XML Document

To open a table or view as an XML document:
1. Display the Open dialog box.
2. Click the Relational DB icon.

Two new tabs appear: Browse and URL Builder.

3. Click the URL Builder tab.

4. Complete the connection settings as described in Specifying Connection Settings.
5. Click the Connect button.

The databases for the server you connected to appear in the URL Builder tab. For example:

6. Expand the tree diagram to locate the table or view you want to open as an XML document. For example:

7. Click the Open button.

Stylus Studio opens the table or view as an XML document in the editor you were using when you displayed the Open dialog box. in this example, the authors table was opened as a source document in the XQuery Mapper.

Notice that the document name contains the connection settings used to define the URL in step 4.

 
Free Stylus Studio XML Training: