serializer.startElement("", "history", "history", attrs);
for(final ListIterator<String> i = queryHistory.listIterator(p); i.hasNext(); ) {
serializer.startElement("", "query", "query", attrs);
final String next = i.next();
serializer.characters(next.toCharArray(), 0, next.length());
serializer.endElement("", "query", "query");
}
serializer.endElement("", "history", "history");
serializer.endDocument();
writer.close();
SerializerPool.getInstance().returnObject(serializer);