MemTreeBuilder builder = context.getDocumentBuilder();
builder.startDocument();
builder.startElement( new QName( "dsml", DSML_NAMESPACE, DSML_PREFIX ), null );
builder.addAttribute( new QName( "dn", null, null ), dn );
builder.startElement( new QName( "directory-entries", DSML_NAMESPACE, DSML_PREFIX ), null );
while( results.hasMore() ) {
SearchResult result = (SearchResult)results.next();
builder.startElement( new QName( "entry", DSML_NAMESPACE, DSML_PREFIX ), null );