0 Favourites

Use xpath Name Function On Child Nodes

  • 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/levelnumber='" & 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?

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
98 7,593
norum82's avatar
norum82
Unread hot topic
92 11,972
SgtConti's avatar
SgtConti
Unread hot topic
85 7,281
shimo's avatar
shimo