0

私は次のようにコードを書いています

String sourceUrlString="http://some url";
Source source=new Source(new URL(sourceUrlString));
Element INFORM = source.getElementById("main").getAllElementsByClass("game").get(i-1);
String INFORM = INFORM.replaceAll("\\s","");   //shows error here
sendResponse(resp,+INFORM);

今、Element is Neglect white spaceからのテキストフェッチが必要です。どうすればよいですか? INFORM上記のString INFORMエラーを表示重複ローカル変数 INFORM );

例えば

エレメント INFORM によるテキスト フェッチは "my name is satish" ですが、次のように応答を送信する必要があります。

「マイナミサティッシュ」

4

1 に答える 1

0

名前INFORMが 2 回使用されていますが、それは不可能です。

String sourceUrlString = "http://some url";
Source source = new Source(new URL(sourceUrlString));
Element INFORM = source.getElementById("main").getAllElementsByClass("game").get(i-1);
String response = INFORM.replaceAll("\\s","");   // ! Use another name here !
sendResponse(resp, respone); // or use '+' - not shure if 1 or 2 args
于 2013-03-24T13:18:48.913 に答える