| 发表于:2007-04-03 21:10:13 楼主 |
string msitename = textsarcher.text.trim(); msxml2.xmlhttp xmlhttp = new msxml2.xmlhttp(); string url = "http://xxx.xx.x.xx/getservice.php?sitename= " + msitename + " "; xmlhttp.open( "get ", url, false, null, null); xmlhttp.send( " "); msxml2.xmldocument dom = new xmldocument(); byte[] b = (byte[])xmlhttp.responsebody; //utf8格式 //string flag = system.text.asciiencoding.utf8.getstring(b, 0, b.length); string andy = system.text.encoding.getencoding( "gb2312 ").getstring(b).trim(); //response.write(url); //response.write(flag); response.write(andy); //response.end(); string[] state = andy.split(new char[] { ' ¦ ' }); string andylu = state[0]; string andylu1 = state[1]; response.write(andylu); response.write(andylu1); 返回数组格式是: 1634 ¦ ¦工商分局;1684 ¦ ¦广东工商局; 现在问题是怎么样拆分,我用split完成,但现在是 " ¦ ¦ " 有谁遇到这样的问题 |
|
|
|
|