Menubar component question


<?xml version="1.0" encoding="utf-8"?>
<mx:MenuBar xmlns:mx="http://www.adobe.com/2006/mxml" labelField="@label">
    <mx:XMLList>
        <menuitem label="Menu">
            <menuitem label="insert" enabled="false"/>
            <menuitem label="control"/>
            <menuitem label="total"/>
        </menuitem>
    </mx:XMLList>
    
</mx:MenuBar>

I have these code, the manubar as a component. I tag this component in my main. The menu didn’t show up. If I copy these code exactly to my main, then it works fine. What’s the reason?