I am trying to have a project load an XML project file and then be able to parse data from that XML data. So far so good it seems. I've read the manual, I've read all the XML tutorials, I've read up on XPATH. What I'd really like is if someone could could show me where I am wrong combining Construct 2 expressions with XPATH. Specifically, I am trying to call up the first string with a specific tag.
Here's my project
I am using the expression XML.StringValue("/rows/row/PowerName") and I am immediately noticing two issues: Only the first word in the string is appearing, if I replace  with  nothing loads despite there being 3 items. A little help would be much appreciated.
It's actually printing "Heavy SlashRunthroughDefensive Strike" but the text area is too small to display it all.
I think you want "/rows/row/PowerName" or "/rows/row/PowerName/text()".
Internet Explorer needs the "/text()" on the end.
Awesome, that works great. I do have a follow up question. Is there a way to replace the  with a check on an Instance Variable?
Develop games in your browser. Powerful, performant & highly capable.
Sure, just use
XML.StringValue("/rows/row[" & variable & "]/PowerName/text()")
I could kiss you. *ahem* But, I'll refrain from doing so. Seriously though, thanks for the help. I have been stumped on this for a couple of weeks now. You've been tremendously helpful.
One (hopefully) final question. Is there a way to format text in an expression?
Here's what I am trying to do specifically:
Here's my expression: "Requirements: " & XML.StringValue("/rows/row[" & SkillBox1.NodeValue & "]/Requirements/text()") & newline
I'd like the first piece of text "Requirements: " to be bold. Is that possible?