Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Document½âÎöxmlÓöµ½µÄÎÊÌâ~~ - Òƶ¯Æ½Ì¨ / Android

XMLÎļþÄÚÈÝ£º
- <ResList>
  <page>0</page> 
- <resItem>
  <resName>WWW</resName> 
  </resItem>
- <resItem>
  <resName>DDD</resName> 
  </resItem>
</ResList>


½âÎö·½·¨£º
public void parseData(){
videoInfo = new LiveVideoInfo();
Element root = mDocument.getDocumentElement();

NodeList page = root.getElementsByTagName("page");
videoInfo.setCurrentPage(Integer.parseInt(page.item(0).getFirstChild().getNodeValue()));

NodeList resItem = root.getElementsByTagName("resItem");
Log.v("LiveVideoXmlParserByDom", ""+resItem.getLength());

for(int i=0;i<resItem.getLength();i++){
video = new LiveVideo();

  Node itemNode = resItem.item(i);
//NodeList itemList = itemNode.getOwnerDocument().getDocumentElement();
Element root1= itemNode.getOwnerDocument().getDocumentElement();
NodeList resNameNode = root1.getElementsByTagName("resName");
if(resNameNode.item(0).getFirstChild()!=null)
video.setResName(resNameNode.item(0).getFirstChild().getNodeValue());

if(BaseData.DEBUG) Log.v("VideoAdapter",""+video.getResName());
video=null;
}
ÎÊÌ⣺res


Ïà¹ØÎÊ´ð£º

ÈçºÎÌá½»xmlÀàÐÍÊý¾Ý - .NET¼¼Êõ / ASP.NET

Êý¾Ý¿â±íÖÐÓÐÒ»ÁУ¨TranXml£©ÀàÐÍÊÇxml£¬´æ´¢µÄÊÇÀàËÆ
<fathernode>
  <a>aaa
  </a>
  <b>bbb
  </b>
</fathernode>
µÄÐÅÏ¢£¬²¢ÇÒͨ¹ý²éѯ·½· ......

Êý¾ÝÒÔxml¸ñʽ·µ»Ø - MS-SQL Server / Ó¦ÓÃʵÀý

´ÓÊý¾Ý¿âÖвéѯһÕűíµÄÊý¾Ý
select ²¿ÃÅ,ÐÕÃû from tb
ÈçºÎ²ÅÄÜÉú³ÉÏÂÃæµÄxml¸ñʽ
XML code:
<folder state="unchecked" label="È«²¿">
¡¡¡¡ <folder state="unchecked&qu ......

ÈçºÎÓÃASP¶ÁÈ¡ XML - Web ¿ª·¢ / ASP

<?xml version="1.0"?>
<root>
<status>433</status>
<msg>Õâ¸öÊǺº×Ö</msg>
<serialno>123</serialno>
</root>
ÈçºÎÓÃASP¶ÁÈ¡ statusÖµ ......

wince³ÌÐòÔõô°ÑXMLÎļþ´«Èëwebservice

ÎÒÔÚ±àдһ¸öwince5.0µÄ³ÌÐò£¬ÏëʵÏÖ°ÑPDAÉϵÄÒ»¸öLIST <STRING>ÀàÐ͵ÄÊý¾ÝÐòÁл¯ÎªXML£¬È»ºóÔÚPCÉϵÄÒ»¸öwebserviceÄõ½Õâ¸öXML£¬×ª»¯ÎªDataset£¬¸üÐÂPCÉϵÄÊý¾Ý¿â£¬ÎÒÏëÎÊÔõô°ÑXML´«¸øwebserviceµÄÄØ£¿
......

±éÀúÒ»¸öxml²¢Êä³öÖ¸¶¨½ÚµãµÄÖµ - .NET¼¼Êõ / C#

ÎÒÓÐÒ»¸öÀàËƵÄxmlµÄ string£¬Ïëͨ¹ý±éÀúÔõô¸öxml Êä³öÎÒÏëÒªµÄelementµÄÖµ
xml Ϊ£º
<Discover xmlns="urn:schemas-microsoft-com:xml-analysis">
  <RequestType>DISCOVER_XML_ME ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ