try {
XSSchemaSet xss = new ModelLoader(opt, new JCodeModel(), receiver).loadXMLSchema();
Iterator<XSComplexType> it = xss.iterateComplexTypes();
while (it.hasNext()) {
XSComplexType ct = it.next();
XSParticle p = ct.getContentType().asParticle();
if(p==null) continue;
Expression tree = ExpressionBuilder.createTree(p);
System.out.println("Graph for "+ct.getName());
System.out.println(tree.toString());