It is a lot easier to use ddms and find the exact exception and get
the stack trace to figure out what's wrong.

On Nov 20, 6:43 pm, Breezy <mbre...@gmail.com> wrote:
> I've a couple functions that basically parse XML but it's not XML it
> is parsing something similar.  I use them in PHP to break apart large
> strings so I converted them to Java for this, but when I use them they
> force close.
> I use this code to call them....
>
>                 String[] blah = dig_all ("item", "enditem", str);
>                 String blah1 = dig_data("author","endauthor",blah[0]);
>
> That's the gist of it.  I know the string "str" is good, checked it,
> but if I run these lines I get a force close, if I comment them out I
> do not.  The methods are below.  See anything wrong?
>
>     private String dig_data(String starter, String ender, String
> content)
>     {
>         String[] data = content.split(starter);
>         String[] data1 = data[1].split(ender);
>         return data1[0];
>     }
>     private String[] dig_all(String starter, String ender, String
> content)
>     {
>         String[] result = null, data, data1;
>         String data2;
>         boolean more = true;
>         int i = 0;
>         int limit = 0;
>
>         do
>         {
>                 i++;
>                 data = content.split(starter);
>                 data1 = data[i].split(ender);
>                 data2 = data1[0];
>                 if ((data2==null) || (limit>0 && i==limit))
>                         more = false;
>                 else result[i] = data2;
>         } while (more == true);
>                 return result;
>     }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to