0

I have a string name "string Variable" = 'hello, hello, good Evening, good evening'. I want to create an array on which I can do a foreach with the values divided by commas.

tnks

1 Answer 1

1

XSLT and XPath don't have an array data type unless you happen to use XPath 3.1 with XSLT 3. However in XSLT and XPath since version 2 there is a tokenize function you can use with e.g. tokenize('hello, hello, good Evening, good evening', ',\s*') to get a sequence of strings you can then process like any other sequence, for instance with a for-each.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.