XPath's name() function issues.

0 favourites
  • 1 posts
  • Greetings!

    First of all, sorry for the bitly-shortened links.

    I'm not able to use any formatting for some reason.

    ---

    Anyway, I'm struggling with the following problem:

    When using XPath's name(nodeset) function to extract the name of a XML element, nothing is retrieved.

    I've done some forum research, but all I found was the following fragments:

    - Ashley stating that Construct merely delegates XPath execution to the browser, having no role in the issue I'm describing ( bit.ly/2Op3JVj ).

    - Magistross running into the issue in Firefox and IE, but not knowing what was wrong ( bit.ly/2Op9CC5 ).

    I decided to test Firefox XPath execution outside of my Construct game using an online tool ( bit.ly/2AWJb4L ) and to my surprise the name() function worked perfectly!

    ---

    Heres's my xml: drive.google.com/open

    My Construct test consisted in printing SpritesXML.StringValue("name(/sprites/*[1])") into a test variable. It's worth mentioning that I successfully loaded the xml into the game using AJAX -> request project file and AJAX -> On complete.

    For the online tool I simply loaded the provided xml using the web interface, then typed name(/sprites/*[1]) as the XPath expression.

    Does anyone know anything else about this?

    Thanks in advance.

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