Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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


Ïà¹ØÎÊ´ð£º

ÀûÓÃC#±àдtxtת»¯µ½xmlµÄ³ÌÐò

txt ºÍXML ¸ñʽÏàÓ¦
²»½èÖúDataSet
µ¼Èë¶ÁÈ¡TXTÎļþ
È»ºóÖ±½ÓдÈëXML(ͬһÎļþ,²»Í¬Êý¾Ý,µÝÔöÔ­Êý¾ÝûÓб»¸²¸ÇÇé¿öÏÂÔö¼ÓÊý¾Ý.)
½Ì¸öÒªµã»ò×îºÃÊÇÓиö´úÂëÌáʾµÄ
¹ý·ºÃºº °ï¸öæÈö^^
²»»á£¬°ïÂ¥Ö÷ ......

ÈçºÎ¶ÔxmlÄÚÈÝÊý¾Ý½øÐÐ±È½Ï - VC/MFC / HTML/XML

ÈçºÎ¶ÔxmlÄÚÈÝÊý¾Ý½øÐбȽÏ
ÀýÈ磺
<?xml version='1.0' encoding='utf-8'?>
  <TestLIST>
  <PID>40</PID>
  <TestName>ÉîÛÚÊÐ</TestName> ......

vb¶ÁÈ¡ÓÃwordת»»³ÉµÄxmlÀïµÄÊý¾Ý - VB / »ù´¡Àà

Private Sub Command1_Click()
Dim MyString() As String
Open "a.xml" For Binary As #1 ' ´ò¿ª¸Õ´´½¨µÄÎļþ¡£
ReDim MyString(LOF(1) - 1)
  Put #1, , MyRecord ' ¶ÁÈëËùÓÐ×Ö·ûµ½±äÁ¿ÖÐ ......

Ϊʲôxml²»ÄÜÏÔʾ°¢À­²®ÎÄ - C/C++ / C++ ÓïÑÔ

ΪʲôÎҵijÌÐòµ÷ÓÃXMLÅäÖÃÎļþÖеİ¢À­²®ÎÄÏÔʾ²»³öÀ´£¿ÆäËûµÄÓïÖÖ¶¼¿ÉÒÔ£¬ÈçÖÐÎÄ£¬Ó¢ÎÄ£¬µÂÎĶ¼¿É¡£
ÎÒ½«XMLµÄ±àÂë¸ÄΪutf-8ºÍunicodeµÄµ½µÃ½á¹û¶¼Ò»Ñù.
°¢À­²®ÎĵÄ×Ö¿âÄãÓÐô£¿

ÓÐ,ÎÒµÄEXEÊÇ·ÅÔÚpc»úÉÏÖ´Ðе ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ