childNode.addChild(findComplexElement(complexTypesRoot, dataType).getChildren());
{	ATreeNode n = findComplexElement(complexTypesRoot,dataType); if( n!= null ) { childNode.addChild(n.getChildren()); } }
	private static void addParticleAndAttributeInfo( ATreeNode node,			XSComplexTypeDecl complexType, ATreeNode complexTypesRoot  )	{		XSParticle particle = complexType.getParticle( );		if ( particle != null )		{			XSObjectList list = ( (XSModelGroupImpl) particle.getTerm( ) ).getParticles( );			for ( int j = 0; j < list.getLength( ); j++ )			{				ATreeNode childNode = new ATreeNode( );				childNode.setValue( ( (XSParticleDecl) list.item( j ) ).getTerm( )						.getName( ) );				String dataType = ( (XSElementDecl) ( (XSParticleDecl) list.item( j ) ).getTerm( ) ).getTypeDefinition( )						.getName( );				if ( dataType == null || dataType.length( ) == 0 )					dataType = childNode.getValue( ).toString( );				childNode.setDataType( dataType );				childNode.setType( ATreeNode.ELEMENT_TYPE );				//Populate the complex data types under node.				if ((!dataType.equals("anyType"))						&& ((XSElementDecl) ((XSParticleDecl) list.item(j))								.getTerm()).getTypeDefinition() instanceof XSComplexTypeDecl)					childNode.addChild(findComplexElement(complexTypesRoot,							dataType).getChildren());				node.addChild(childNode);			}		}		if(!includeAttribute)			return;		XSAttributeGroupDecl group = complexType.getAttrGrp( );		if ( group != null )		{			XSObjectList list = group.getAttributeUses( );			for ( int j = 0; j < list.getLength( ); j++ )			{				ATreeNode childNode = new ATreeNode( );				childNode.setValue( ( (XSAttributeUseImpl) list.item( j ) ).getAttrDeclaration( )						.getName( ) );				childNode.setType( ATreeNode.ATTRIBUTE_TYPE );				node.addChild( childNode );			}		}	}