Noob needs help with multiple menus for app

Former Member
Former Member
Can someone let me know how to have more than one menu in my app.
I get an XML error when I try it. I have tried everything I can think of.

<menu id="MainMenu">
<menu-item id="item_1">@Strings.menu_label_1</menu-item>
<menu-item id="item_2">@Strings.menu_label_2</menu-item>
<menu-item id="item_3">@Strings.menu_label_3</menu-item>
</menu>
<menu id="OtherMenu">
<menu-item id="item_1">@Strings.menu_label2_1</menu-item>
<menu-item id="item_2">@Strings.menu_label2_2</menu-item>
<menu-item id="item_3">@Strings.menu_label2_3</menu-item>
<menu-item id="item_4">@Strings.menu_label2_4</menu-item>
<menu-item id="item_5">@Strings.menu_label2_5</menu-item>
<menu-item id="item_6">@Strings.menu_label2_6</menu-item>
<menu-item id="item_7">@Strings.menu_label2_7</menu-item>
<menu-item id="item_8">@Strings.menu_label2_8</menu-item>
<menu-item id="item_9">@Strings.menu_label2_9</menu-item>
<menu-item id="item_10">@Strings.menu_label2_10</menu-item>
</menu>
  • Former Member
    Former Member over 8 years ago
    I would guess encapsulate the whole lot in<menus>
    </menus>
  • Former Member
    Former Member over 8 years ago
    I would guess encapsulate the whole lot in<menus>
    </menus>


    EDIT ... Thank you that works. ;-)
  • @VivoactiveHRGuy Just to explain a little: one of the cardinal rules of XML is that you can only have one root node or parent. In your example, you have two <menu> nodes at the top level, which is why the XML parser is complaining. Wrapping everything in a <menus> parent, like sharkbait suggested, satisfies the rule and makes things happy again. :)
  • Former Member
    Former Member over 8 years ago
    @VivoactiveHRGuy Just to explain a little: one of the cardinal rules of XML is that you can only have one root node or parent. In your example, you have two <menu> nodes at the top level, which is why the XML parser is complaining. Wrapping everything in a <menus> parent, like sharkbait suggested, satisfies the rule and makes things happy again. :)


    Thanks Brandon and sharkbait_au .. yes, that did fix my issue and everything is great.