How do I fix this XML issue ?

Get help using Construct 2

Post » Sat Jan 07, 2017 11:21 am

So I am trying to do the following

IF 301<Final<330, Resistor Text = R1560
IF 331<Final<360, Resistor Text = R1563
Else , Resistor Text = Help

Now the code seems to be working, but I am getting no display.

I've used code like this for other projects, and it works fine, but unless it's one of those times I'm just glazing over something obvious, I am wondering if there is an issue with my implementation of this code.

Please help if you can :shock:

LINK
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699

Post » Sat Jan 07, 2017 12:37 pm

XML Naming Rules
XML elements must follow these naming rules:

    Element names are case-sensitive
    Element names must start with a letter or underscore
    Element names cannot start with the letters xml (or XML, or Xml, etc)
    Element names can contain letters, digits, hyphens, underscores, and periods
    Element names cannot contain spaces

XML Elements


Code: Select all
<?xml version='1.0' ?>
<Ref>

   <r0603>
      <r330>R1560</r330>
      <r360>R1563</r360>
   </r0603>
      
   <r0805>
      <r330>R1040</r330>
      <r360>R1043</r360>
   </r0805>

   <r1206>
      <r330>R8080</r330>
      <r360>R8083</r360>
   </r1206>

</Ref>


xml.StringValue("/Ref/r0603/r330/text()")
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Sat Jan 07, 2017 8:54 pm

Argh !

Thank you for that, I'm going to go fix it right away, I knew it must have been somethin simple
Using R243 for all examples
B
69
S
20
G
6
Posts: 379
Reputation: 9,699


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests