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

objective c xml½âÎö

    ½ñÌìÔÚCCÉÏ¿´µ½evangelÔÚÕÐÈË£¬ÉÏÃæÐ´ÁËÒ»ÌõÊý¾Ý½âÎö£¬ÎÒÏëÓ¦¸Ã¾ÍÊǶÔXMLµÄ½âÎö°É£¬ÔÝÇÒÕâÑùÀí½âÁË£¬ºÇºÇ¡£ÏÂÎçËÑË÷ÁËÒ»µã¶«Î÷×Ô¼ºÅªÁËÒ»¸öXMLÈ»ºó¶Á¶Á¿´¿´£¬ÏÖÔÚ½ö½öÊǶÁ³öÁËһЩ¶«Î÷£¬Ïȱ£´æ´úÂ룬´ýºóÐø¸üУ¡
    Õâ¸öÊÇÎÒ´´½¨µÄxmlÎļþ£¬ÓÃÓÚ²âÊÔÓõģº
<?xml version="1.0" encoding="UTF-8"?>
<book>
 <book1>
 <author>zhangsan</author>
 <title>Hello this is book1</title>
 <content>book1 is very good for testing!</content>
 </book1>
 <book2>
 <author>lisi</author>
 <title>Hello this is book2</title>
 <content>book2 is very good for testing!</content>
 </book2>
 <book3>
 <author>wangwu</author>
 <title>Hello this is book3</title>
 <content>book3 is very good for testing!</content>
 </book3>
</book>
¶Ôxml½øÐнâÎöÐèҪʹÓÃNSXMLParserÀ࣬Ê×ÏÈÉùÃ÷Ò»¸öNSXMLParser¶ÔÏó
NSXMLParser *xmlRead;
NSString *path = [[NSBundle mainBundle] pathForResource:@"test" ofType:@"xml"];
 NSFileHandle *file = [NSFileHandle fileHandleForReadingAtPath:path];
 NSData *data = [file readDataToEndOfFile];//µÃµ½xmlÎļþ
 [file closeFile];
 xmlRead = [[NSXMLParser alloc] initWithData:data];//³õʼ»¯NSXMLParser¶ÔÏó
 [data release];
 [xmlRead setDelegate:self];//ÉèÖÃNSXMLParser¶ÔÏóµÄ½âÎö·½·¨´úÀí
 BOOL success = [xmlRead parse];//µ÷ÓôúÀí½âÎöNSXMLParser¶ÔÏ󣬿´½âÎöÊÇ·ñ³É¹¦
//½âÎöÆ÷£¬´ÓÁ½¸ö½áµãÖ®¼ä¶ÁÈ¡ÄÚÈÝ
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string {
NSLog(string);
}
//»ñµÃ½áµã½áβµÄÖµ
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName
  namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName {
 NSLog(elementName);
}
//»ñµÃ½áµãÍ·µÄÖµ
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName


Ïà¹ØÎĵµ£º

¡¶win32»ã±à¡·Ê±ÖÓÖ®C´úÂë

#include <Windows.h>
#include <math.h>
#include "resource.h"
#define PI 3.1415976/180
int dwCenterX,dwCenterY,dwRadius;
const TCHAR *szAppName=TEXT("Clock");
LRESULT CALLBACK ProcWinMain(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
void ShowTime(HWND hwnd,HDC hdc);
void ......

C³ÌÐò±àÒë¹ý³Ì

±àÒ룬±àÒë³ÌÐò¶ÁȡԴ³ÌÐò£¨×Ö·ûÁ÷£©£¬¶ÔÖ®½øÐдʷ¨ºÍÓï·¨µÄ·ÖÎö£¬½«¸ß¼¶ÓïÑÔÖ¸Áîת»»Îª¹¦ÄܵÈЧµÄ»ã±à´úÂ룬ÔÙÓÉ»ã±à³ÌÐòת»»Îª»úÆ÷ÓïÑÔ£¬²¢ÇÒ°´ÕÕ²Ù×÷ϵͳ¶Ô¿ÉÖ´ÐÐÎļþ¸ñʽµÄÒªÇóÁ´½ÓÉú³É¿ÉÖ´ÐгÌÐò¡£
CÔ´³ÌÐòÍ·Îļþ£­£­>Ô¤±àÒë´¦Àí(cpp)£­£­>±àÒë³ÌÐò±¾Éí£­£­>ÓÅ»¯³ÌÐò£­£­>»ã±à³ÌÐò£­£­>Á´½Ó³ÌÐò--> ......

Ò»¸ö¼òµ¥µÄC/S¶àÏß³ÌÓ¦ÓÃ

Ò»¸ö¼òµ¥µÄC/S¶àÏß³ÌÓ¦ÓÃ,ÉÔ΢À©Õ¹¾Í¿ÉÒÔÓÃÁË
/*socketÊÇÍøÂçÓ¦ÓóÌÐòµÄºËÐÄ£¬ÔÚ·þÎñÆ÷¶Ë»ò¿Í»§¶ËÍøÂçÓ¦ÓóÌÐòÖУ¬socket½ÔΪ²»¿ÉȱÉÙµÄÒªËØ
*ÔÚ·þÎñÆ÷³£¼ûµÄÓ¦ÓÃÓУºFTP·þÎñÆ÷£¬MAIL·þÎñÆ÷£¨SMTP£¬POP3£¬IMAP4ЭÒ飩£¬WEB£¨HTTPЭÒ飩
*½¨Á¢·þÎñÆ÷¶ËSOCKETµÄÓ¦ÓóÌÐò²½ÖèÈçÏ£º
*1¡£½¨Á¢·þÎñÆ÷¶ËµÄSOCKET£¬²¢ÇÒÒÔ´ ......

linuxÏÂcÓïÑԹػú³ÌÐò

/* Offtimer.c.For auto halt. */
#include <time.h>
#include <stdlib.h>
#include <unistd.h>
#define DELAY 60/* Time of sleeping */
int main()
{
  time_t now;
  struct tm *p;
  
  while(1)
  {
  now = time(NULL);
&n ......

glooxÖÐxmlµÄ½âÎö

·Ü¶·Á˽«½üÒ»¸öÔÂÒÆÖ²gloox¿âµ½brewƽ̨£¬ÔÚxml½âÎöµÄ×¼±¸Õâ±ß»¨Á˲»ÉÙʱ¼ä¡£ÆÚ¼äÒ²ÖØÐ·â×°Á˱ê×¼¿âµÄstring¡¢map¡¢listÀ࣬ÏÖÔÚ»ØÍ·ÏëÏëÊÕ»ñ»¹ÊÇÂù´óµÄ£¬µ«ÊÇÃ²ËÆÊÇÎÞÓõġ£
gloox´Ó0.9°æ±¾¿ªÊ¼¾Íno dependency on iksemel anymore£¬¶øiksemel×î³õÊÇרÃÅΪjabberдµÄxml½âÎöÆ÷£¬Õâô¿´À´£¬¶ÔÕâ¸öʱ¼ä·Ç³£½ôÆÈµÄÏîÄ¿À´Ëµ£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ