Hi, I'm trying to parse this menu structure and put it into a drill-down tableview. I think that I need multiple delegates, but if someone has an actual full-fledge sample, not just snippets of code, this would help me out.
The reason that this is hard is b/c menuitems can have menuitems which in turn can have its own menuitems. The tags keep repeating and the sequential parser is proving very difficult for me.
The reason that this is hard is b/c menuitems can have menuitems which in turn can have its own menuitems. The tags keep repeating and the sequential parser is proving very difficult for me.
Code:
1. <testxml>
2. <Menu>
3. <MenuItem>
4. <menuName>Menu 1</menuName>
5. <MenuChildren>
6. <MenuItem>
7. <menuName>Sub-Menu 1</menuName>
8. </MenuItem>
9. <MenuItem>
10. <menuName>Sub-Menu 1a</menuName>
11. <MenuChildren>
12. <MenuItem>
13. <menuName>Sub-Sub-Menu 1aa</menuName>
14. </MenuItem>
15. </MenuChildren>
16. </MenuItem>
17. </MenuChildren>
18. </MenuItem>
19. <MenuItem>
20. <menuName>Menu 2</menuName>
21. </MenuItem>
22. <MenuItem>
23. <menuName>Menu 3</menuName>
24. </MenuItem>
25. <MenuItem>
26. <menuName>Menu 4</menuName>
27. </MenuItem>
28. </Menu>
29. </testxml>