Package

Source Code of NewClass

import fileManagers.XMLController;
import layoutHandling.LayoutHandler;
import layoutHandling.XMLParser;
import umat.beans.Node;
import umat.beans.Tree;

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

/**
*
* @author Tudor
*/
public class NewClass {
    public static void main(String[] args){
        Tree tree=new Tree();
       XMLController ctr=new XMLController(tree);
       tree.getRoot().setData("NewTree");
       Node n1=new Node("n1",tree.getRoot());
       Node n2=new Node("n2",tree.getRoot());
       Node n3=new Node("n3",tree.getRoot());
      
       n1.setFieldName("f1");
       n1.setFieldType("String");
       n1.addField();
      
       n2.setFieldName("f2");
       n2.setFieldType("String");
       n2.addField();
      
       Node n21=new Node("n2.1",n2);
       Node n22=new Node("n2.2",n2);
      
       Node n31=new Node("n3.1",n3);
       n31.setFieldName("f31");
       n31.setFieldType("String");
       n31.addField();
       Node n32=new Node("n3.2",n3);

       ctr.parseToXML();
      
      
       String xml = "<?xml version=\"1.0\"?><!DOCTYPE cael []>"+
                "<cael version=\"1.0\" aeh=\"reject\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"caels.xsd\">"+
                "<countryCode name=\"Austria\" threela=\"ROU\" twola=\"RO\" numeric=\"642\"/>"+
                "<authority help=\"more\" expert=\"teachers\" aehApproved=\"hide\"/>"+
                "<group genderseparation=\"rejected\"/>"+
                "<language presence=\"show\" culture=\"show\"/>"+
                "<lesson hierarchy=\"deep\" help=\"more\" access=\"limited\" choice=\"limited\" ambiguity=\"less\"/>"+
                "<data security=\"absent\"/>"+
                "<comment>Comment text for Romania's CAE-L description</comment>"+
                "</cael>";
       XMLParser parser = new XMLParser(xml);
       parser.parseXML();
       LayoutHandler lh = parser.getLh();
       lh.toString();
    }
   
}
TOP

Related Classes of NewClass

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.