三、Nano XML 解析 XML Vectorlist=k XML eroot.getChildren();//获取子节点列表 Vectorcontents=newVector();//用于获取节点内容 for( int i=0;ilist.size();++i){ k XML Element node =(k XML
Vector list = kXMLeroot.getChildren();//获取子节点列表 Vector contents = new Vector();//用于获取节点内容 for(int i = 0; i < list.size(); ++i){ kXMLElement node = (kXMLElement) list.elementAt(i); String tag = node.getTagName(); if(tag == null) continue; if(!tag.equals( "item" )) continue; 织梦内容管理系统 contents.addElement(node.getContents()); } String[] contentStrs = new String[contents.size()];//转化为字符串数组 |
NanoXML是一个能在CLDC 环境下运行的开放源代码,NanoXML是非常小(6KB)的一步 本文来自织梦
复制地址和好友共享





