Note that there are some explanatory texts on larger screens.

plurals
  1. POhttpconnection stringitem in j2me
    primarykey
    data
    text
    <p>I have wriiten an httpconnection app that returns headlines and links form a website and display on the form/stringtiem. How can I seperate the headlines from the links given that all of the them are now concatenated into one string which displays on one stringitem?</p> <p>Here's the code: </p> <pre><code>String line = results.toString(); int position = line.indexOf("&lt;h2 class=\"cross-head\"&gt;"); position = line.indexOf("&gt;", position); // int position2 = line.indexOf("&lt;/h3&gt;", position); // res = line.substring(position + 1, position2); // while (res.indexOf("&lt;") != -1) { int beginTag; int endTag; beginTag = res.indexOf("&lt;"); endTag = res.indexOf("&gt;"); if (beginTag == 0) { res = res.substring(endTag + 1, res.length()); } else { res = res.substring(0, beginTag) + res.substring(endTag + 1, res.length()); } description = replace(res, "&amp;quot;", "\""); description = replace(description, "&amp;nbsp;", ""); description = replace(description, "&amp;rsquo;", "'"); description = replace(description, "&amp;lsquo;", "'"); description = replace(description, "&amp;ldquo;", "\""); description = replace(description, "&amp;rdquo;", "\""); description = replace(description, "&amp;ndash;", "-"); description = replace(description, "&amp;amp;", "&amp;"); description = replace(description, "&amp;#039;", "'"); description = replace(description, "Â", ""); } // // End Parsing // display the page contents on the phone screen StringItem resultField = new StringItem(null, description, Item.HYPERLINK); form.append(resultField); </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload