Xml and IE10

Get help using Construct 2

Post » Fri Jan 04, 2013 6:52 pm

Hi there !

I would like to use xml file in order to translate a game.

<?xml version="1.0" encoding="UTF-8" ?>

<root>

<lang pays="FRA">
<value id="tree">arbre</value>
<value id="house">maison</value>
</lang>

<lang pays="US">
<value id="tree">tree</value>
<value id="house">house</value>
</lang>
      
</root>    

Easy, it works fine on Firefox and Chrome, but not on IE (I have IE 10 for information) ! XML.nodeCount find the node (root/lang[FRA]/value[tree] for example), but XML.StringValue return nothing. I don't understand. Maybe it's a bug ? Or a bad encoding (I tested a lot of them of course) ? Help ! :)

Here is a simple capx file to illustrate my problem : http://dl.dropbox.com/u/15473488/xml_and_ie.capx

Run it on IE!

Thanks,

Sylvain.Sylvain2013-01-04 18:55:51
B
40
S
9
G
5
Posts: 127
Reputation: 6,609

Post » Fri Jan 04, 2013 7:13 pm

I found the tip !
You must put /text() at the end of the XPath with XML.StringValue. It works on IE on that way.

Maybe more explanations in the manual would be helpful and spared me one hour testing all encodings and way of XPath ^^

(maybe this topic will help someone else in the future :) )
B
40
S
9
G
5
Posts: 127
Reputation: 6,609

Post » Thu Aug 15, 2013 10:09 am

Thanx Sylvain you made my day
B
3
Posts: 1
Reputation: 704


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests