Home General

How to populate an array using StEvalXPath?

In my loop I'm trying to populate an array with a new value on each repeat but it only displays the first value

$count ++;
$nameArray_[$count] = StEvalXPath("/data/message/DOC9370X/0XX2ATID[$count]");
log(1, "name array = " + $nameArray
[$count]);
^the above only show the first value in the path

log(1, "xpath test ma= " +StEvalXPath("/data/message/DOC9370X/_0XX2ATID[1]"));
log(1, "xpath test= nu " +StEvalXPath("/data/message/DOC9370X[2]/_0XX2ATID[2]"));
log(1, "xpath test= al " +StEvalXPath("/data/message/DOC9370X/_0XX2ATID[3]"));
^and this only shows the first value as well, the second and third log do not show any value

Best Answer

  • Can you help answer this question?

    We've noticed this question is over 30 days old and hasn't received a response. We're turning to you, the community, to help answer it.

    This generic response is intended to prompt discussion in this post. The question remains open to your answers, suggestions, and best practices.

    If you posted this question and were able to resolve the issue, or still need additional help, please let us know. Your question and its resolution are important to us, and we want to help.

    David Sciuto

Answers

  • Can you help answer this question?

    We've noticed this question is over 30 days old and hasn't received a response. We're turning to you, the community, to help answer it.

    This generic response is intended to prompt discussion in this post. The question remains open to your answers, suggestions, and best practices.

    If you posted this question and were able to resolve the issue, or still need additional help, please let us know. Your question and its resolution are important to us, and we want to help.

    David Sciuto

This discussion has been closed.