IBM Version 5 Universal Remote User Manual


 
Chapter 11. Light weight XML-based Enterprise Application 263
Figure 11-4 Converting an XML Document
11.3.3 XMLToSQL architecture
The XMLToSQL takes one parameter to initialize. That parameter is SQLProperty
class and it contains following data:
JdbcDriver JDBC Driver name
LoginId Database login id
Password Database login password
JdbcServer Server name (ex. jdbc:db2:Airline)
Schema Set Schema if it is different
Action INSERT or UPDATE
Once the XMLToSQL is instantiate, invoke the execute method to insert or
update. XMLToSQL to connect to the database, and insert or update the data,
then disconnect from the database (Figure 11-5).
Connection pooling or datasource is not supported in this release. But
XMLToSQL has a property to set a connection. By using this property, an
application can set the connection. We will discuss how to do it later.
XML
Document
<SQLResult>
<{$TABLE-NAME}>
<{$COLUMN}>
value
</{$COLUMN}>
.
</{$TABLE-NAME}>
</SQLResult>
SQLToXML
XMLToSQL
CustomerXSL
ProduceDOMDoc..
<Customer>
<firstname>
IT
</firstname>
.
.
.
</Customer>
Tip: What is the schema? When you use SELECT * from
db2admin.employee,
db2admin is the schema.