ClassName |
|
---|---|
Component |
|
The XMLToDOM
servlet bean parses an XML document that is specified by the input
parameter. The result of the parse is bound to the document
parameter, which can then be manipulated inside the output
open parameter.
The XMLToDOM
servlet bean does not have any inherent way to output its results. You typically want to nest some other servlet bean or code that can handle the resulting Data Object Model (DOM) component within the output
parameter of XMLToDOM
.
Input Parameters
input
Specifies the XML document to be parsed. This can be either the absolute or relative URL for an XML document.
validate
Optional: Determines if the parser should validate this document against the DTD specified in the input
parameter. Options include:
true: Read the DTD, validate the document, and apply all information from the DTD.
false (default): Read the DTD, do not validate the document, but substitute default attributes, and apply other information from the DTD at the parser’s discretion (Apache Xerces supports this mode).
nodtd
: Do not read the DTD, validate the document, or apply any defaults or other information. Use this mode when you do not want the parser to try and resolve the DTD location, perhaps because the remote URL location is temporarily unreachable. Note that the resulting document might be incomplete, might have incorrect attribute values, and does not have substitution of external entities. (Apache Xerces supports this mode, but it might not be available for every parser).
Note that if the XML document does not have a DTD, you must omit this parameter.
Output Parameters
document
Optional: The parameter to bind to a DOM document if the XML document is successfully retrieved and parsed.
errors
Optional: The parameter to bind to an enumeration of Exceptions if failures occurred when parsing or retrieving the XML document.
Open Parameters
unset
Optional: Specifies the parameter to render if the input
parameter is not set.
output
Optional: Specifies the parameter used when the XML document is successfully retrieved and parsed.
failure
Optional: Specifies the parameter used to format output when there is a failure to parse or retrieve the XML document.