if (urlLoader.open(page) == HttpLoader.LOAD_SUCCESS) {
String contentType = urlLoader.getContentType();
String contentEncoding = urlLoader.getContentEncoding();
if ((contentType!=null) && (contentType.toLowerCase().startsWith("text/html"))) {
HttpStream ws = new HttpStream(urlLoader.getStream(), "", contentType, contentEncoding);
String rawPage = ws.getString();
ws.clear();
try {
String ret = "<?xml version=\"1.0\" encoding=\"utf-8\"?><result>";
ret += "<page><![CDATA[" + rawPage + "]]>" + "</page></result>";
urlLoader.close();
return ret;