Use xpath Name Function On Child Nodes

0 favourites
  • 1 posts
From the Asset Store
1463 files of +850 unique phrases of a cheerful female hero child for FPS, RPG, Action, Adventure, Survival, games etc.
  • 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/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?

  • Try Construct 3

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

    Try 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)