以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 XML基础 』  (http://bbs.xml.org.cn/list.asp?boardid=1)
----  [求助]xml的读取的简单问题  (http://bbs.xml.org.cn/dispbbs.asp?boardid=1&rootid=&id=7283)


--  作者:cris_1210
--  发布时间:5/8/2004 2:37:00 PM

--  [求助]xml的读取的简单问题
public String toXml() {
   StringBuffer xml=new StringBuffer();
   xml.append("<?xml version='1.0' encoding='GB2312'><mo><gw_id>");
      xml.append(getgwid());
   xml.append("</gwid><serviceid>");
   xml.append(toSecurity(getService_Id()));
   xml.append("</serviceid><src>");
   xml.append(getSrc_terminal_Id());
   xml.append("</src><dest>");
   xml.append(getDest_Id());
   xml.append("</dest><msg>");
   xml.append(toSecurity(getMsg_Content()));
   xml.append("</msg><reserved>");
   xml.append(toSecurity(getReserved()));
   xml.append("</reserved><format>");
   xml.append(getMsg_Fmt());
   xml.append("</fomat></mo>");
   return xml.toString();
}
我把xml用一个字符串 表示,怎么提取其中我要得 dest_id和service_id?
麻烦大家教导一下,谢谢

  


W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
3,429.688ms