<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" import="javax.xml.parsers.*,org.w3c.dom.*,java.io.*"%>
<%		
	try
	{
		response.setContentType("text/plain");
		String xml = request.getParameter("xml");
		ByteArrayInputStream isXml = new ByteArrayInputStream(xml.getBytes());
		DocumentBuilder DocBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
		Document Doc = DocBuilder.parse(isXml);
		String message = Doc.getDocumentElement().getFirstChild().getNodeValue();
	
		if (message.equals("Hi There!"))
		{
			out.write("And hi there to you!");
		}
		else
		{
			out.write("Later Gator!");
		}
		isXml.close();
	}
	catch (Exception e)
	{
		out.write(e.toString());
	}
%>