<%@ page contentType="application/xml" import="java.sql.*" %>
<% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") ; %>
<%
Connection connection = DriverManager.getConnection(
"jdbc:odbc:data", "YourName", "password");
Statement statement = connection.createStatement() ;
ResultSet resultset = statement.executeQuery("select name, id from Publishers");%>
<%
while(resultset.next()){
%>
<<%=resultset.getMetaData().getColumnName(1)%>>
<%
String s = resultset.getString(1);
int index = s.indexOf("&");
StringBuffer sb = new StringBuffer(s);
if(index > 0){
sb.replace(index, index + 1, "and");
}
out.println(sb);
%>
<%=resultset.getMetaData().getColumnName(1)%>>
<<%=resultset.getMetaData().getColumnName(2)%>>
<%= resultset.getString(2) %>
<%=resultset.getMetaData().getColumnName(2)%>>
<%
}
%>