|
Dear Sir:
I had developed some custom tags about adding output XML functions for cooperated with <sql:resultSet> tag and <sql:connection> tag. The source program about those output XML custom
tags are XmlForQueryTag.java and XmlForResultSetTag.java,
and their usage are as following: =>XmlForQueryTag.java
Usage: <sql:xmlForQuery conn="conn1" sql="SELECT Name, Grade, Time FROM Students" /> or <sql:xmlForQuery conn="conn1" sql="SELECT Name, Grade, Time FROM Students" rootTag="ROWLIST" rowTag="ITEM" /> ========================== =>XmlForResultSetTag.java Usage: <sql:xmlForResultSet name="rset1" /> or <sql:xmlForResultSet name="rset1" rootTag="ROWLIST" rowTag="ITEM" /> I rewrote the dbtags.tld file and defined some
properties about new output XML custom tags as follow:
<tag> <name>xmlForQuery</name> <tagclass>XmlForQueryTag</tagclass> <bodycontent>empty</bodycontent> <attribute> <name>conn</name> <required>yes</required> <rtexprvalue>no</rtexprvalue> </attribute> <attribute> <name>sql</name> <required>yes</required> <rtexprvalue>no</rtexprvalue> </attribute> <attribute> <name>rootTag</name> <required>no</required> <rtexprvalue>no</rtexprvalue> </attribute> <attribute> <name>rowTag</name> <required>no</required> <rtexprvalue>no</rtexprvalue> </attribute> </tag> <tag> <name>xmlForResultSet</name> <tagclass>XmlForResultSetTag</tagclass> <bodycontent>JSP</bodycontent> <attribute> <name>name</name> <required>yes</required> <rtexprvalue>no</rtexprvalue> </attribute> <attribute> <name>rootTag</name> <required>no</required> <rtexprvalue>no</rtexprvalue> </attribute> <attribute> <name>rowTag</name> <required>no</required> <rtexprvalue>no</rtexprvalue> </attribute> </tag> Also I wrote some test files for this new custom
tags and it works fine.
All the new output XML custom tags's source files
(XmlForQueryTag.java and XmlForResultSetTag.java) and
testing jsp files ( XmlForQueryTag.jsp and XmlForResultSetTag.jsp) are appended with this email. your sincerely
Chung-Lin
Teng email:[EMAIL PROTECTED]
|
XmlForResultSetTag.jsp
Description: Binary data
XmlForQueryTag.jsp
Description: Binary data
XmlForResultSetTag.java
Description: JavaScript source
XmlForQueryTag.java
Description: JavaScript source
