Use xpath Name Function On Child Nodes

Get help using Construct 2

Post » Fri Dec 27, 2013 3:58 am

I'm using XML to set up some level data for a game. Part of the data includes a random number of child nodes under a node that is always included on each level. While the parent node is always there, not all children are present for each level. I'm trying to use xpath's "name" function to determine the element names for each of the children. The call is being made inside of a loop, and the syntax looks like this:

XMLLevelData.StringValue("name(/LevelData/level[@number='" & CurrentLevel & "']/LevelWeapons/*[" & loopindex & "])")

Unfortunately, this doesn't work. Before I go too far down the rabbit hole, does Construct 2 support full xpath functionality? Specifically, is the "name" function implemented?
B
5
Posts: 11
Reputation: 272

Return to How do I....?

Who is online

Users browsing this forum: Google [Bot], tarek2 and 13 guests