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


Ïà¹ØÎĵµ£º

½áºÏ·´ÉäÓë XML ʵÏÖ Java ±à³ÌµÄ¶¯Ì¬ÐÔ

·´ÉäÊÇ Java ÓïÑÔ±»ÊÓΪ¶¯Ì¬»ò×¼¶¯Ì¬ÓïÑÔµÄÒ»¸ö¹Ø¼üÐÔÖÊ£¬½áºÏ·´ÉäºÍ XML »á°ïÖúÎÒÃǸü¿ì¡¢¸ü·½±ãµØʵÏÖһЩ¶¯Ì¬´úÂ룬´Ó¶ø½â¾ö±à³ÌÖпÉÄÜÓöµ½µÄ²»È·¶¨ÎÊÌâ¡£±¾ÎĽ«½áºÏ·´ÉäÓë XML ¶Ô Java ±à³ÌµÄ¶¯Ì¬ÐÔ½øÐÐÉîÈëdz³öµÄÌÖÂÛ¡£ÔÚÀí½â±¾ÎĵÄ˼ÏëÖ®ºó£¬Äú¿ÉÒÔ½«ÆäÓ¦Óõ½³ÌÐòÖÐÒÔ´´½¨Áé»îµÄ´úÂë¡£
ÒýÑÔ
ÔÚÏÖʵÉú»îÖУ¬¾­³£»á·¢ ......

C#µ÷ÓÃC DLL

ÔÚºÏ×÷¿ª·¢Ê±£¬C#ʱ³£ÐèÒªµ÷ÓÃC++DLL£¬µ±´«µÝ²ÎÊýʱʱ³£Óöµ½ÎÊÌ⣬ÓÈÆäÊÇ´«µÝºÍ·µ»Ø×Ö·û´®ÊÇ£¬ÏÖ×ܽáһϣ¬·ÖÏí¸ø´ó¼Ò£º
VC++ÖÐÖ÷Òª×Ö·û´®ÀàÐÍΪ£ºLPSTR,LPCSTR, LPCTSTR, string, CString, LPCWSTR, LPWSTRµÈ
µ«×ªÎªC#ÀàÐÍÈ´²»ÍêÈ«Ïàͬ¡£
Ö÷ÒªÓÐÈçϼ¸ÖÖת»»£º
½«stringתΪIntPtr£ºIntPtr System.Runtime.InteropServ ......

¿¼²éǶÈëʽC¿ª·¢ÈËÔ±×îºÃµÄÊ®µÀÌâ²Î¿¼´ð°¸

Ïêϸ²Î¿¼´ð°¸
µÚ1Ìâ:   (b)
volatile×ÖÃæÒâ˼ÊÇÒ×ÓÚ»Ó·¢µÄ¡£Õâ¸ö¹Ø¼ü×ÖÀ´ÃèÊöÒ»¸ö±äÁ¿Ê±£¬Òâζ×Å ¸ø¸Ã±äÁ¿¸³Öµ(дÈë)Ö®ºó£¬ÂíÉÏÔÙ¶ÁÈ¡£¬Ð´ÈëµÄÖµÓë¶ÁÈ¡µÄÖµ¿ÉÄܲ»Ò»Ñù,ËùÒÔ˵Ëü"ÈÝÒ×»Ó·¢"µÄ¡£
ÕâÊÇÒòΪÕâ¸ö±äÁ¿¿ÉÄÜÒ»¸ö¼Ä´æÆ÷£¬Ö±½ÓÓëÍⲿÉ豸ÏàÁ¬£¬ÄãдÈëÖ®ºó£¬¸Ã¼Ä´æÆ÷Ò²ÓпÉÄܱ»ÍⲿÉ豸µÄд²Ù×÷Ëù¸Ä±ä;»òÕ ......

mysql c ½Ó¿Ú´óÈ«


MYSQLÔÚ C API ÖпÉÓõĺ¯Êý£º
mysql_affected_rows()
·µ»Ø±»×îеÄUPDATE, DELETE»òINSERT²éѯӰÏìµÄÐÐÊý¡£
mysql_close()
¹Ø±ÕÒ»¸ö·þÎñÆ÷Á¬½Ó¡£
mysql_connect()
Á¬½ÓÒ»¸öMySQL·þÎñÆ÷¡£¸Ãº¯Êý²»ÍƼö£»Ê¹ÓÃmysql_real_connect()´úÌæ¡£
mysql_change_user()
¸Ä±äÔÚÒ»¸ö´ò¿ªµÄÁ¬½ÓÉϵÄÓû§ºÍÊý¾Ý¿â¡£
mysql_ ......

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

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