public static void insertChild (DefaultMutableTreeNode node, String child){
        
        if (getName(node.getUserObject())=="hierarchy"){
        if (child.equals("hierarchydocs")){
        HierarchyDocsType doc=new HierarchyDocsType();
        ((HierarchyType) node.getUserObject()).setHierarchyDocs(doc);
        }
        if (child.equals("hierarchyblocks")){
        HierarchyBlocksType doc=new HierarchyBlocksType();
        ((HierarchyType) node.getUserObject()).setHierarchyBlocks(doc);
        }
        }
        
        if (getName(node.getUserObject())=="hierarchydocs"){
        if (child.equals("document")){
        DocumentType doc=new DocumentType();
        doc.setDirection(DirType.ASCENDING);
        ((HierarchyDocsType) node.getUserObject()).getDocument().add(doc);
        }
        }
        if ((getName(node.getUserObject())=="hierarchyblocks")) {
        if (child.equals("imageblock")){
        ImageBlockType doc=new ImageBlockType();
        doc.setBottom(BigInteger.ZERO);
        doc.setLeft(BigInteger.ZERO);
        doc.setRight(BigInteger.ZERO);
        doc.setTop(BigInteger.ZERO);
        doc.setRefid("0");
        ((HierarchyBlocksType) node.getUserObject()).getTextBlockOrImageBlockOrComposedBlock().add(doc);
        }
        
        if (child.equals("textblock")){
        TextBlockType doc=new TextBlockType();
        doc.setBottom(BigInteger.ZERO);
        doc.setLeft(BigInteger.ZERO);
        doc.setRight(BigInteger.ZERO);
        doc.setTop(BigInteger.ZERO);
        doc.setRefid("0");
        ((HierarchyBlocksType) node.getUserObject()).getTextBlockOrImageBlockOrComposedBlock().add(doc);
        }
        
        if (child.equals("composedblock")){
        ComposedBlockType doc=new ComposedBlockType();
        doc.setType(ImposedType.BODY);
        ((HierarchyBlocksType) node.getUserObject()).getTextBlockOrImageBlockOrComposedBlock().add(doc);
        }   
        }
        
        if ((getName(node.getUserObject())=="composedblock")) {
        if (child.equals("imageblock")){
        ImageBlockType doc=new ImageBlockType();
        doc.setBottom(BigInteger.ZERO);
        doc.setLeft(BigInteger.ZERO);
        doc.setRight(BigInteger.ZERO);
        doc.setTop(BigInteger.ZERO);
        doc.setRefid("0");
        ((ComposedBlockType) node.getUserObject()).getTextBlockOrImageBlockOrComposedBlock().add(doc);
        }
        
        if (child.equals("textblock")){
        TextBlockType doc=new TextBlockType();
        doc.setBottom(BigInteger.ZERO);
        doc.setLeft(BigInteger.ZERO);
        doc.setRight(BigInteger.ZERO);
        doc.setTop(BigInteger.ZERO);
        doc.setRefid("0");
        ((ComposedBlockType) node.getUserObject()).getTextBlockOrImageBlockOrComposedBlock().add(doc);
        }
        
        if (child.equals("composedblock")){
        ComposedBlockType doc=new ComposedBlockType();
        doc.setType(ImposedType.BODY);
        ((ComposedBlockType) node.getUserObject()).getTextBlockOrImageBlockOrComposedBlock().add(doc);
        }   
        }
        
        
        if (getName(node.getUserObject())=="imageblock"){
        if (child.equals("polygon")){
        PolygonType doc=new PolygonType();
        ((ImageBlockType) node.getUserObject()).setPolygon(doc);
        }
        }
        
        if (getName(node.getUserObject())=="textblock"){
        if (child.equals("textline")){
        TextBlockType.TextLine doc=new TextBlockType.TextLine();
        doc.setBottom(BigInteger.ZERO);
        doc.setLeft(BigInteger.ZERO);
        doc.setRight(BigInteger.ZERO);
        doc.setTop(BigInteger.ZERO);
        
        ((TextBlockType) node.getUserObject()).getTextLine().add(doc);
        }
        }
        
        if (getName(node.getUserObject())=="textline"){
        if (child.equals("string")){
        String doc=new String();
        ((TextBlockType.TextLine) node.getUserObject()).getString().add(doc);
        }
        }
        
        if (getName(node.getUserObject())=="polygon"){
        if (child.equals("point")){
        PointType doc=new PointType();
        doc.setX(BigInteger.ZERO);
        doc.setY(BigInteger.ZERO);
        ((PolygonType) node.getUserObject()).getPoint().add(doc);
        }
        }  
    }