I'm back with a problem, where I need help with starting.
I got an XML file that contains a number of elements with IDREF type attributes:
Expand|Select|Wrap|Line Numbers
- <?xml version="1.0" ?>
- <root>
- // these elements contain all the info for the groups
- // name is of type ID
- <group name="group1" … />
- <group name="group2" … />
- <group name="group3" … />
- <collection>
- // group is of type IDREF
- // there can be any number of elements
- <item group="group1">…</item>
- <item group="group1">…</item>
- <item group="group2">…</item>
- <collection>
- <root>
Expand|Select|Wrap|Line Numbers
- // desired result
- <div id="group1">
- <a … >
- <a … >
- </div>
- <div id="group2">
- <a … >
- </div>
Is it possible to somehow get all the ID values of <group> and iterate over each of them?
thanks
PS: once I know all the IDREFS inside <collection> there are no problems I can foresee