23 Replies Latest reply on Jul 8, 2008 3:06 PM by Developer504

    Multiple XML elements in LabelFunction

    Developer504 Level 1
      I have this simple function function to pad some spaces on the title of a chart:

      public function fixName (
      {return cat + " ";}

      It works great, and inserts the first element of the XML record, "name". I would like to add the second element to the same string, but I can't figure out how to refer to it. Cat:Object seems to refer only to the first element ("name"), pcat refers to the name on the previous record.

      This is my file:

      <worker name="SMITH, JOHN H" code="CM" hours="3.00" percent="7.50" />

      How do I add the second element, 'code', to my function? I can't figure out how to point to a second element.