Node child = children.item(i); System.out.println(child);
ElementImpl child = (ElementImpl)children.item(i);
    public static void main( String args[] ) throws Exception {        if ( args.length < 1 ) {            usage();        }        String collection = "/db";        String file;        if ( args.length == 2 ) {            // if collection does not start with "/" add it            collection = ( args[0].charAt( 0 ) == '/' ) ? args[0] : "/db/" + args[0];            file = args[1];        } else {            file = args[0];        }        // initialize database drivers        Class cl = Class.forName( driver );        Database database = (Database) cl.newInstance();        database.setProperty( "create-database", "true" );        DatabaseManager.registerDatabase( database );        // get the collection        Collection col =                DatabaseManager.getCollection( URI + collection );        col.setProperty( "pretty", "true" );        col.setProperty( "encoding", "ISO-8859-1" );        // get the resource        XMLResource res = (XMLResource) col.getResource( file );        if ( res == null ) {            System.err.println( "could not retrieve document " + file + "!" );            return;        }        Element root = (Element)res.getContentAsDOM();		NodeList children = root.getElementsByTagName("PERSONAE");		for(int i = 0; i < children.getLength(); i++) {			Node child = children.item(i);			System.out.println(child);			ElementImpl elem = new ElementImpl("PERSONA");			child.appendChild(elem);			System.out.println(child);		}    }