Package nl.gx.webmanager.foundation
Class XMLWriter
- java.lang.Object
-
- nl.gx.webmanager.foundation.XMLWriter
-
public class XMLWriter extends Object
This class can be used for retrieving xml used in xsl transformations. XML is retrieved from the request and session context.
-
-
Constructor Summary
Constructors Constructor Description XMLWriter()
Constructs a new instance for retrieving xml from the request and session.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
getXml(javax.servlet.http.HttpServletRequest request, String keyPrefix, Writer writer)
Retrieves the xml from the request context and the session for keys starting with a prefix.void
getXml(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpSession session, String keyPrefix, Writer writer)
Retrieves the xml from the request context and the session for keys starting with a prefix.protected void
normalizeXml(String xml, Writer writer)
Normalizes xml and writers it to a writer.
-
-
-
Method Detail
-
getXml
public void getXml(javax.servlet.http.HttpServletRequest request, String keyPrefix, Writer writer) throws IOException
Retrieves the xml from the request context and the session for keys starting with a prefix.- Parameters:
req
- The request from with the xml should be retrieved, possiblenull
.keyPrefix
- The prefix the keys that should be retrieved.writer
- The writer to which the result should be written.- Throws:
IOException
- If the result could not be written to the writer.
-
getXml
public void getXml(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpSession session, String keyPrefix, Writer writer) throws IOException
Retrieves the xml from the request context and the session for keys starting with a prefix.- Parameters:
req
- The request from with the xml should be retrieved, possiblenull
.session
- The session from which the xml should be retrieved, possiblenull
.keyPrefix
- The prefix for the keys that should be retrieved.writer
- The writer to which the result should be written.- Throws:
IOException
- If the result could not be written to the writer.
-
normalizeXml
protected void normalizeXml(String xml, Writer writer) throws IOException
Normalizes xml and writers it to a writer.- Parameters:
xml
- The xml that should be normalized.writer
- The output stream for the result.- Throws:
IOException
- If the result could not be written to the writer.
-
-