Code example for DefaultHandler

0
                serialize(new Sub2(), Sub2.class)); 
    } 
 
    private void assertValidXML(String s) throws Exception {
        SAXParser p = SAXParserFactory.newInstance().newSAXParser();
        p.parse(new InputSource(new StringReader(s)),new DefaultHandler());
    } 
 
    /** 
     * Can we write out anonymous classes as the root object? 
     */ 
    public void testAnonymousClass() throws Exception { 
        assertValidXML(serialize(new X() {},X.class)); 
    } 
 
    @ExportedBean 
    public static class PA { 
        @Exported public int[] v = new int[]{1,2,3};
    } 
 
    public void testPrimitiveArrays() throws Exception {