Android split not working correctly

Viewed 20881

I've been developing an Android app for the past 4 Months now and came across the following regarding the split function:

String [] arr;
SoapPrimitive result = (SoapPrimitive)envelope.getResponse();
arr = result.toString().trim().split("|");

The result variable is what I get after accessing my WebService, now this works perfectly. But, for some reason my split("|") method is not splitting at "|" but rather splitting at every single char in my result String. So my array looks like this:

arr[0] is "H", arr[1] is "e", etc......

I don't know why this is happening because I have used it before in the same project and it worked perfectly.

Thank you in advance

2 Answers
Related