Consider the following program that finds all named ComplexTypes in an XML schema. Fr example, the following complex type definition is introducing a type called PurchaseOrderType. Find the UNKNOWNs below. Schema { {{ HashSet getDefThings(ClassGraph cg){ String definedThings = "from Schema to ComplexType"; Visitor v = new Visitor(){ HashSet r = new HashSet(); void before(ComplexType host){ String n = host.get_attrs().search_name(); if (!(n == null)) r.add(n); } public Object getReturnValue(){return r;} }; cg.traverse(this,definedThings,v); return (HashSet) v.getReturnValue(); } }} } AttrValue_List { {{ String search_name(){ Enumeration en = this.elements(); String s = new String("name"); String result; while (en.hasMoreElements()) { AttrValue n = (AttrValue) en.nextElement(); if (s.equals(n.get_attrName().toString())) { result = n.get_attrValue(); System.out.println("Type " + result + " found"); return result; } } System.out.println("NOTHING FOUND"); return null; } }} }