I have some XML formatted as such:
<item> <title>Name</title> <id>12</id> <upgrade> <id>13</id> <level>2</level> </upgrade> <upgrade> <id>14</id> <level>3</level> </upgrade> </item>
Ultimately from this example I want 3 nodes:
- Title: “Name (1)” GUID: 12
- Title: “Name (2)” GUID: 13
- Title: “Name (3)” GUID: 14
I’m quite happy to do 2 runs of the file if necessary. I have one importer at the moment which sets up the “Name (1)” items. This works perfectly.
I have a second importer set up which I can successfully create the secondary “upgrade” nodes but only if I use itemupgrade as the context, at which point I lose the title element so the nodes come through as ” (2)”, ” (3)” etc.
If I use item as the context like the initial importer, I can’t seem to loop through the upgrade XML nodes.