xml attribute node

Get help using Construct 2

Post » Wed Jan 15, 2014 6:19 pm

been on this for a while...

I'm iterating thru attribute nodes with a subloop @*

it should just give the text from that node

how would i set my text then? nothing seems to work

set text to myxml.StringValue("?")

testfile
ImageImage
B
71
S
22
G
7
Posts: 827
Reputation: 10,177

Post » Wed Jan 15, 2014 8:52 pm

myxml.StringValue(".") to select the current node.
B
55
S
29
G
19
Posts: 1,520
Reputation: 25,670

Post » Wed Jan 15, 2014 9:21 pm

oh man, great, it works, thank you !

would you know if its possible to get the actual text instead of the value

ex. > name="Playerstatus" you get "name"

i want to make something that works for multiple xml structures, so that would be nice
ImageImage
B
71
S
22
G
7
Posts: 827
Reputation: 10,177

Post » Thu Jan 16, 2014 8:43 am

found how you get the <element> name (not the value)

just myxml.StringValue("name()")
ImageImage
B
71
S
22
G
7
Posts: 827
Reputation: 10,177


Return to How do I....?

Who is online

Users browsing this forum: dop2000, Google [Bot] and 12 guests