extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.nucleus.TimedOperationService
              extended by atg.nucleus.servlet.ServletService
                  extended by atg.nucleus.servlet.HttpServletService
                      extended by atg.servlet.DynamoServlet
                          extended by atg.droplet.xml.XMLToDOM
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, ParameterServlet, java.util.EventListener, javax.servlet.Servlet

public class XMLToDOM
extends DynamoServlet

This droplet parses an XML document which is specified by the input parameter. The result of the parse will be bound to the document parameter, which can then be manipulated inside the output oparam.

These are the parameters for the XMLToDOM droplet:

Input Paramaters
input (required)
Specifies the XML document to be parsed. This can be either an absolute or relative URL for an XML document.

validate (optional)
Determine how the XML document specified by the input parameter should be validated against a DTD specified in its DOCTYPE declaration. Validation will be slower, but may help prevent problems later when accessing parts of the XML document. The legal values are:

This parameter is optional, the default value is false. If there is no DOCTYPE declaration, this parameter has no effect.

Output Paramaters
document (optional)
This parameter will be bound to a DOM document if the XML document was successfully retrieved and parsed. This parameter name is optional. If a name is not provided, the output will be bound to the document parameter.

errors (optional)
This parameter will be bound to an Enumeration of Exceptions if there were failures when parsing or retrieving the XML document.

Open Paramaters
This oparam will be used when there is no input document URL parameter.

This oparam will be used to format output when there was a failure to retrieve, parse, or serialize the XML document. It will also be invoked if the documentCache property is null.

This oparam can be used to process or render the XML document when it has been successfully retrieved and parsed. If there is no output parameter, the DOM is serialized directly to the response.

Static files should almost always be served directly. When no output oparam is present, the process is not just a transparent conversion of the XML, since it can be validated or indented, and it will loose any internal DTD subset. This cycle of parsing, validation, and serialization will be much slower than simply passing the file to the response, but it can be useful for debugging during development. When the DOM is serialized ot the page, it uses the encoding and MIME type from the Dynamo servlet pipeline. These are typically determined by the EncodingTyper and MimeTyper components, and the default values will be ISO-8859-1 and text/html.

Field Summary
static java.lang.String CLASS_VERSION
protected static java.lang.String DOCUMENT_PARAM
          The name of the document output parameter
protected static java.lang.String ERRORS_PARAM
          The name of the errors outpu parameter
protected static java.lang.String FAILURE_PARAM
          The name of the failure open parameter
protected static java.lang.String INPUT_PARAM
          The name of the input input parameter
protected static java.lang.String OUTPUT_PARAM
          The name of the output open parameter
protected static java.lang.String UNSET_PARAM
          The name of the unset open parameter
protected static java.lang.String VALIDATE_PARAM
          The name of the validate input parameter
Fields inherited from class atg.servlet.DynamoServlet
mAllowCleanupRequest, mParameters
Fields inherited from class atg.nucleus.servlet.ServletService
Fields inherited from class atg.nucleus.GenericService
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
Constructor Summary
Method Summary
 DocumentCache getDocumentCache()
          The DocumentCache used by this component.
 void service(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes)
          Parse an XML document
 void setDocumentCache(DocumentCache pDocumentCache)
          The DocumentCache used by this component
Methods inherited from class atg.servlet.DynamoServlet
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, service, service, setParameter
Methods inherited from class atg.nucleus.servlet.ServletService
destroy, getServletConfig, getServletInfo, init, setServletInfo
Methods inherited from class atg.nucleus.TimedOperationService
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static java.lang.String CLASS_VERSION


protected static java.lang.String INPUT_PARAM
The name of the input input parameter


protected static java.lang.String VALIDATE_PARAM
The name of the validate input parameter


protected static java.lang.String DOCUMENT_PARAM
The name of the document output parameter


protected static java.lang.String ERRORS_PARAM
The name of the errors outpu parameter


protected static java.lang.String UNSET_PARAM
The name of the unset open parameter


protected static java.lang.String FAILURE_PARAM
The name of the failure open parameter


protected static java.lang.String OUTPUT_PARAM
The name of the output open parameter

Constructor Detail


public XMLToDOM()
Method Detail


public void setDocumentCache(DocumentCache pDocumentCache)
The DocumentCache used by this component


public DocumentCache getDocumentCache()
The DocumentCache used by this component.


public void service(DynamoHttpServletRequest pReq,
                    DynamoHttpServletResponse pRes)
             throws javax.servlet.ServletException,
Parse an XML document

service in class DynamoServlet
pReq - the request to be processed
pRes - the response object for this request
javax.servlet.ServletException - an application specific error occurred processing this request - an error occurred reading data from the request or writing data to the response.