public static void main(String[] args) {
	   
      // Create a variable for the connection string.
      String connectionUrl = "jdbc:sqlserver://localhost:1433;" +
            "databaseName=AdventureWorks;integratedSecurity=true;";

      // Declare the JDBC objects.
      Connection con = null;
      Statement stmt = null;
      ResultSet rs = null;
      
      try {
         // Establish the connection.
         Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
         con = DriverManager.getConnection(connectionUrl);

         // Create initial sample data.
         createSampleTables(con);
         
         // The showGetters method demonstrates how to parse the data in the 
         // SQLXML object by using the SAX, ContentHandler and XMLReader.  
         showGetters(con);            

         // The showSetters method demonstrates how to set the xml column 
         // by using the SAX, ContentHandler, and ResultSet.
         showSetters(con);   
         
         // The showTransformer method demonstrates how to get an XML data 
         // from one table and insert that XML data to another table 
         // by using the SAX and the Transformer. 
         showTransformer(con);        
      }
      // Handle any errors that may have occurred.
      catch (Exception e) {
         e.printStackTrace();
      }
      finally {
         if (rs != null) try { rs.close(); } catch(Exception e) {}
         if (stmt != null) try { stmt.close(); } catch(Exception e) {}
         if (con != null) try { con.close(); } catch(Exception e) {}
      }
   }