Ajax/xml - reading variables from an xml file

Get help using Construct 2

Post » Mon Jul 17, 2017 9:22 pm

I'm having a bit of trouble here. This...:

https://ibb.co/jerPHv

... sets the text to zero. I've tried with StringValue as well but still nothing.

Here's the xml in question:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<Resolutions>
    <Res>
        <x>1920</x>
        <y>1080</y>
    </Res>
</Resolutions>

How do I use this to get at the numbers x and y exactly...?
B
39
S
16
G
6
Posts: 543
Reputation: 7,619

Post » Mon Jul 17, 2017 10:19 pm

You actually need to start the path at root /, so "/Resolutions/Res[1]/x"
ImageImageImage
B
71
S
22
G
247
Posts: 3,756
Reputation: 137,558

Post » Mon Jul 17, 2017 10:29 pm

That worked, thanks! :)
B
39
S
16
G
6
Posts: 543
Reputation: 7,619


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests