You can use the methods in this section to insert XML data into a database column.
The parameters in method declarations in this section have the following meanings:
If you do not specify nsa or validating, the driver uses the xml4j nonvalidating XML parser. To change the default, see the previous section, Specifying a Parser Factory.
The following methods parse a file using SAX and convert it to a string. You can then use the string returned by these methods as input to the PreparedStatement.setString() method to insert the data into a database column.
public String XMLtoString(String file, String handler, boolean validating,boolean nsa) throws SQLException public String XMLtoString(String file, String handler) throws SQLException public String XMLtoString(String file) throws SQLException
The following methods parse a file using SAX and convert it to an object of class InputStream. You can then use the InputStream object as input to the PreparedStatement.setAsciiStream(), PreparedStatement.setBinaryStream(), or PreparedStatement.setObject() methods to insert the data into a database column.
public InputStream XMLtoInputStream(String file, String handler, boolean validating,boolean nsa) throws SQLException; public InputStream XMLtoInputStream(String file, String handler) throws SQLException; public InputStream XMLtoInputStream(String file) throws SQLException;
For examples of using these methods, see Inserting Data Examples.
If no value is specified, or if handler is set to NULL, the driver uses the default Informix handler.