NodeList nodes = document.getChildNodes( ); ATreeNode root = new ATreeNode( ); root.setValue( "ROOT" ); populateNodeList( nodes, root, 0 ); populateRoot( root ); return root;
ATreeNode root = new ATreeNode( );  root.setValue( "ROOT" ); for ( int i = 0; i < map.getLength( ); i++ ) { ATreeNode node = new ATreeNode( ); XSElementDecl element = (XSElementDecl) map.item( i );  node.setValue( element.getName( ) ); node.setType( ATreeNode.ELEMENT_TYPE ); node.setDataType( element.getName( ) ); if ( element.getTypeDefinition( ) instanceof XSComplexTypeDecl ) { XSComplexTypeDecl complexType = (XSComplexTypeDecl) element.getTypeDefinition( );  if ( complexType.getName( ) != null ) { node.setDataType( complexType.getName( ) ); node.addChild( findComplexElement( complexTypesRoot, complexType.getName( ) ).getChildren( ) ); }  else {  addParticleAndAttributeInfo( node, complexType ); } } root.addChild( node );
	public static ATreeNode getSchemaTree( String fileName )			throws OdaException	{		try		{		    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance( );			factory.setNamespaceAware( true );			DocumentBuilder builder = factory.newDocumentBuilder( );			Document document = builder.parse( fileName );			NodeList nodes = document.getChildNodes( );			ATreeNode root = new ATreeNode( );			root.setValue( "ROOT" );			populateNodeList( nodes, root, 0 );			populateRoot( root );			return root;		}		catch ( ParserConfigurationException e )		{			throw new OdaException( e.getMessage( ) );		}		catch ( SAXException e )		{			throw new OdaException( e.getMessage( ) );		}		catch ( IOException e )		{			throw new OdaException( e.getMessage( ) );		}	}