| org.gomba.TransactorAbstractServlet org.gomba.AbstractServlet org.gomba.SingleQueryServlet org.gomba.XMLServlet
XMLServlet | public class XMLServlet extends SingleQueryServlet (Code) | | Render data accessed via JDBC in XML syntax. The SQL in the
query init-param should be a SELECT and must return a
resultset. This servlet inherits the init-params of
org.gomba.AbstractServlet , plus:
- doctype-public
- Specifies the public identifier to be used in the document type
declaration. If the doctype-system init-param is not set, then the
doctype-public init-param is ignored. (Optional)
- doctype-system
- Specifies the system identifier to be used in the document type
declaration. (Optional)
- media-type
- The resource MIME content type. Defaults to "text/xml" (Optional)
- root-element
- The output XML root element name. Defaults to "resultSet" (Optional)
- row-element
- The output XML row element name. If an empty value is specified the row
element is omitted. This is useful for queries that always return a single
row. Defaults to "row" (Optional)
- xslt
- The XSLT stylesheet to apply to the default XML output. (Optional)
- xslt-params
- XSLT parameters in Java Properties format. (Optional)
- xslt-output-properties
- XSLT output properties in Java Properties format.
http://www.w3.org/TR/xslt#output (Optional)
- column-case
- The case of XML element names. May be 'lower', 'upper' or 'original'.
Default: 'lower' (Optional)
This servlet can handle the following HTTP methods: GET, HEAD.
The row element children are named after the corresponding JDBC column. If a
column name in your db is not a valid XML element name or you would like to
use a different name in the XML, just use the AS SQL keyword
to change it. It is the user responsibility to create a DTD or XML Schema for
the generated XML.
author: Flavio Tordini version: $Id: XMLServlet.java,v 1.15 2005/12/03 15:47:11 flaviotordini Exp $ |
|
|