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

¼òµ¥½âÎöXML - Òƶ¯Æ½Ì¨ / Android

XML code:

<?xml version="1.0" encoding="utf-8" ?>
- <info>
<status>ok</status>
<error />
- <item>
<uid>819789</uid>
<show>ºÃµÄ</show>
<email />
</item>
</info>
- <item>
<uid>819780</uid>
<show>ºÃµÄ2</show>
<email>eee@222.com<email>
</item>
- <item>
<uid>819720</uid>
<show>ºÃµÄ3</show>
</item>
</info>



Èç¹ûstatusΪokµÄÇé¿öÏÂ,¾Í¶ÁÈ¡itemµÄÊôÐÔ

²ÉÓÃorg.w3c.dom½âÎö.
¸ÕѧJAVA.ÔÚXMLÉϾÍÓÐÎÊÌâÁË.ÉÏÍøÕÒÁËЩ.ºÇºÇ.Ö÷ÒªÊǶÔÓÚÀýÈç<email /> µÄֵΪ¿Õ»òÕßûÓÐ<email>Õâ¸ö½ÚµãÒªÈçºÎÅжÏ.

¶¥Ò»ÏÂ.

ÓÃandroid×Ô´øµÄ½âÎöÆ÷ SAX ½âÎöÆðÀ´Ëٶȷdz£¿ì ¶øÇÒͦ¼òµ¥µÄ  

Èç¹û½âÎöstatusΪok ¾ÍÉèÖÃÒ»¸öboolean ÒòΪSAXÊÇÖðÐнâÎöµÄ Èç¹ûΪTRUEµÄ»° ¾Í½âÎöÏÂÒ»¸ö Èç¹ûÊÇFALSE ¾Íreturn ÕâÑù¾Í¿ÉÒÔÁË ¿´ÏÂsdkµÄÎĵµ

ÓÃSAXÒ»¶¨ÒªBaseFeedParserÂï?
ÕâÑùÓÐʲôºÃ´¦ÄØ?
²»ÄÜÖ±½Ó¾Ínew Ò»¸ö¶ÔÏó.È»ºó¶Áȡij¸ö×Ö½ÚµÄÊý¾ÝÕâÑùÂð?
¿´Á˺öà.ÓеãÔÎ.ºÇºÇ.

ÓÃSAX¹¤³§ÀàÉú³ÉËü È»ºó¶¨ÒåDefaultHandler ¶¨Òå½âÎöXMLµÄ¹æÔò 
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser = factory.newSAXParser();

È»ºóparser


Ïà¹ØÎÊ´ð£º

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

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

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

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

VCÖÐxml±éÀú - VC/MFC / ATL/ActiveX/COM

ÈçºÎÓÃATL´°ÌåÓ¦ÓóÌÐòÖÐÓÃSystem.Xml±éÀúÒ»¸öXmlÎļþ
Äã˵µÄÊÇÍйܴúÂ룿
¡£

vc¿ÉÓÃmsxml
http://msdn.microsoft.com/en-us/library/ms767594(VS.85).aspx

MSXML4  
  //ÒýÈëmsxml4.dll &nbs ......

XmlDocumentÈçºÎÉú³É±ÕºÏ±ê¼ÇµÄXML - .NET¼¼Êõ / C#

ÎÒÓÃXmlDocumentÉú³ÉXML
XmlElement remarkNode = node.OwnerDocument.CreateElement("remark");
remark1Node.InnerXml = "";
Èç¹ûInnerXml¸³Öµ²»Îª¿Õ£¬ÔòÉú³ÉµÄ±ê¼ÇÊÇûÎÊÌâµÄ£¬±ÈÈ磺<r ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ