// page and folder menu definition menu elements ordered
// polymorphic collection to strip artifical <menu-element>
// tags enabling Castor XML binding; see JETSPEED-INF/castor/page-mapping.xml
writer = new OutputStreamWriter(new FileOutputStream(f), PSML_DOCUMENT_ENCODING);
Serializer serializer = new XMLSerializer(writer, this.format);
final DocumentHandler handler = serializer.asDocumentHandler();
Marshaller marshaller = new Marshaller(new DocumentHandler()
{
private int menuDepth = 0;
public void characters(char[] ch, int start, int length) throws SAXException