[ÊÕ²ØתÌû]JAVA¶ÔXMLÎĵµµÄËÄÖÖ½âÎö·½Ê½
±¾ÎÄת×ÔCSDN ·½ÖÛ
¶ÔÓÚÐèÒª×Ô¼º±àд´úÂëÀ´´¦Àí XML ÎĵµµÄ¿ª·¢ÈËÔ±À´Ëµ£¬
Ñ¡Ôñ DOM »¹ÊÇ SAX ½âÎöÄ£ÐÍÊÇÒ»¸ö·Ç³£ÖØÒªµÄÉè¼Æ¾ö²ß¡£
¡¡¡¡DOM ²ÉÓý¨Á¢Ê÷ÐνṹµÄ·½Ê½·ÃÎÊ XML Îĵµ£¬¶ø SAX ²ÉÓõÄʼþÄ£ÐÍ¡£
¡¡¡¡DOM ½âÎöÆ÷°Ñ XML Îĵµ×ª»¯ÎªÒ»¸ö°üº¬ÆäÄÚÈݵÄÊ÷£¬²¢¿ÉÒÔ¶ÔÊ÷½øÐбéÀú¡£Óà DOM ½âÎöÄ£Ð͵ÄÓŵãÊDZà³ÌÈÝÒ×£¬¿ª·¢ÈËÔ±Ö»
ÐèÒªµ÷Óý¨Ê÷µÄÖ¸ÁȻºóÀûÓÃnavigation APIs·ÃÎÊËùÐèµÄÊ÷½ÚµãÀ´Íê³ÉÈÎÎñ¡£¿ÉÒÔºÜÈÝÒ×µÄÌí¼ÓºÍÐÞ¸ÄÊ÷ÖеÄÔªËØ¡£È»¶øÓÉÓÚʹ
Óà DOM ½âÎöÆ÷µÄʱºòÐèÒª´¦ÀíÕû¸ö XML Îĵµ£¬ËùÒÔ¶ÔÐÔÄܺÍÄÚ´æµÄÒªÇó±È½Ï¸ß£¬ÓÈÆäÊÇÓöµ½ºÜ´óµÄ XML ÎļþµÄʱºò¡£ÓÉÓÚËüµÄ±é
ÀúÄÜÁ¦£¬DOM ½âÎöÆ÷³£ÓÃÓÚ XML ÎĵµÐèҪƵ·±µÄ¸Ä±äµÄ·þÎñÖС£
¡¡¡¡SAX ½âÎöÆ÷²ÉÓÃÁË»ùÓÚʼþµÄÄ£ÐÍ£¬ËüÔÚ½âÎö XML ÎĵµµÄʱºò¿ÉÒÔ´¥·¢Ò»ÏµÁеÄʼþ£¬µ±·¢ÏÖ¸ø¶¨µÄtagµÄʱºò£¬Ëü¿ÉÒÔ¼¤»î
Ò»¸ö»Øµ÷·½·¨£¬¸æË߸÷½·¨Öƶ¨µÄ±êÇ©ÒѾÕÒµ½¡£SAX ¶ÔÄÚ´æµÄÒªÇóͨ³£»á±È½ÏµÍ£¬ÒòΪËüÈÿª·¢ÈËÔ±×Ô¼ºÀ´¾ö¶¨ËùÒª´¦ÀíµÄtag¡£
ÌرðÊǵ±¿ª·¢ÈËÔ±Ö»ÐèÒª´¦ÀíÎĵµÖÐËù°üº¬µÄ²¿·ÖÊý¾Ýʱ£¬SAX ÕâÖÖÀ©Õ¹ÄÜÁ¦µÃµ½Á˸üºÃµÄÌåÏÖ¡£µ«Óà SAX ½âÎöÆ÷µÄʱºò±àÂ빤×÷
»á±È½ÏÀ§ÄÑ£¬¶øÇÒºÜÄÑͬʱ·ÃÎÊͬһ¸öÎĵµÖеĶദ²»Í¬Êý¾Ý¡£
¡¡JDOM µÄÄ¿µÄÊdzÉΪ Java Ìض¨ÎĵµÄ£ÐÍ£¬Ëü¼ò»¯Óë XML µÄ½»»¥²¢ÇÒ±ÈʹÓà DOM ʵÏÖ¸ü¿ì¡£ÓÉÓÚÊǵÚÒ»¸ö Java Ìض¨Ä£ÐÍ£¬JDOM
Ò»Ö±µÃµ½´óÁ¦ÍƹãºÍ´Ù½ø¡£ÕýÔÚ¿¼ÂÇͨ¹ý“Java ¹æ·¶ÇëÇó JSR-102”½«Ëü×îÖÕÓÃ×÷“Java ±ê×¼À©Õ¹”¡£´Ó 2000 Äê³õ¾ÍÒѾ¿ªÊ¼
ÁË JDOM ¿ª·¢¡£
¡¡¡¡JDOM Óë DOM Ö÷ÒªÓÐÁ½·½Ã治ͬ¡£Ê×ÏÈ£¬JDOM ½öʹÓþßÌåÀà¶ø²»Ê¹Óýӿڡ£ÕâÔÚijЩ·½Ãæ¼ò»¯ÁË API£¬µ«ÊÇÒ²ÏÞÖÆÁËÁé»îÐÔ¡£
µÚ¶þ£¬API ´óÁ¿Ê¹ÓÃÁË Collections À࣬¼ò»¯ÁËÄÇЩÒѾÊìϤÕâЩÀàµÄ Java ¿ª·¢ÕßµÄʹÓá£
¡¡¡¡JDOM ÎĵµÉùÃ÷ÆäÄ¿µÄÊǓʹÓà 20%£¨»ò¸üÉÙ£©µÄ¾«Á¦½â¾ö 80%£¨»ò¸ü¶à£©Java/XML ÎÊÌ┣¨¸ù¾ÝѧϰÇúÏß¼Ù¶¨Îª 20%£©¡£
JDOM ¶ÔÓÚ´ó¶àÊý Java/XML Ó¦ÓóÌÐòÀ´Ëµµ±È»ÊÇÓÐÓõģ¬²¢ÇÒ´ó¶àÊý¿ª·¢Õß·¢ÏÖ API ±È DOM ÈÝÒ×Àí½âµÃ¶à¡£JDOM »¹°üÀ¨¶Ô³ÌÐò
ÐÐΪµÄÏ൱¹ã·º¼ì²éÒÔ·ÀÖ¹Óû§×öÈκÎÔÚ XML ÖÐÎÞÒâÒåµÄÊ¡£È»¶ø£¬ËüÈÔÐèÒªÄú³ä·ÖÀí½â XML ÒÔ±ã×öһЩ³¬³ö»ù±¾µÄ¹¤×÷£¨»òÕß
ÉõÖÁÀí½âijЩÇé¿öϵĴíÎ󣩡£ÕâÒ²ÐíÊDZÈѧϰ DOM »ò JDOM ½Ó¿Ú¶¼¸üÓÐÒâÒåµÄ¹¤×÷¡£
¡¡¡¡JDOM ×ÔÉí²»°üº¬½âÎöÆ÷¡£Ëüͨ³£Ê¹Óà SAX2 ½âÎöÆ÷À´½âÎöºÍÑéÖ¤Êä
Ïà¹ØÎĵµ£º
Oracle ´æ´¢¹ý³Ì·µ»Ø½á¹û¼¯Óà ref cursor ʵÏÖ¡£
ÊÔÑé²½ÖèÈçÏ£º
1. ½¨Á¢ ref cursor ÀàÐͺ͹ý³Ì
CREATE OR REPLACE PACKAGE types
AS
TYPE ref_cursor IS REF CURSOR;
END;
/
CREATE TABLE STOCK_PRICES(
RIC VARCHAR(6) PRIMARY KEY,
PRICE NUMBER(7 ......
/*****************Animal.java begin ***********************/
public class Animal{
public void jj(){
}
public static void main(String args[]){
//±àÒëʱÀàÐÍ //ÔËÐÐʱÀàÐÍ
Animal anima ......
1.»ù±¾¸ÅÄîµÄÀí½â
¾ø¶Ô·¾¶£º¾ø¶Ô·¾¶¾ÍÊÇÄãµÄÖ÷Ò³ÉϵÄÎļþ»òĿ¼ÔÚÓ²ÅÌÉÏÕæÕýµÄ·¾¶£¬(URLºÍÎïÀí·¾¶)ÀýÈ磺
C:xyz est.txt ´ú±íÁËtest.txtÎļþµÄ¾ø¶Ô·¾¶¡£http://www.sun.com/index.htmÒ²´ú±íÁËÒ»¸öURL¾ø¶Ô·¾¶¡£
Ïà¶Ô·¾¶£ºÏà¶ÔÓëij¸ö»ù׼Ŀ¼µÄ·¾¶¡£°üº¬WebµÄÏà¶Ô·¾¶£¨HTMLÖеÄÏà¶ÔĿ¼£©£¬ÀýÈ磺ÔÚ
Servl ......
Óöµ½¹ýÕâÑùÒ»¸öÇé¿ö£¬ÐèÒªÓÃjava¶ÁÈ¡Ò»¸ö200MµÄÎı¾¸ñʽÎļþ£¬¶øÇÒ»¹ÐèÒª¶ÔÎļþµÄÄÚÈÝ×ö½âÎö£¬½øÐзִʡ£Èç¹ûÓÃJVMµÄĬ
ÈÏÉèÖã¬ÀûÓÃScannerÀàÖ»ÄܶÁ³ö4M´óСÄÚÈÝ£¬ÓÚÊÇÎÒ¾ÍÔÚÍøÉÏËÑË÷£¬µ«ÊÇÍøÉÏûÓÐÕÒµ½Ò»ÆªÎÄÕÂÊÇÎÒËùÐèÒªµÄÄÚÈÝ¡£ÓÚÊÇÎÒÖ»ºÃ·thinking
in
java£¬·¢ÏÖÁËÒ»¸öjavaµÄnioÀïÓиöMappedByteBufferÀ࣬ËûµÄ×÷Ó ......
java Óë c# 3des ¼Ó½âÃÜ
Ö÷Òª²îÒìÈçÏ£º
1¡¢ ¶ÔÓÚ´ý¼ÓÃܽâÃܵÄÊý¾Ý£¬¸÷×ÔµÄÌî³äģʽ²»Ò»Ñù
C#µÄģʽÓУºANSIX923¡¢ISO10126¡¢None¡¢PKCS7¡¢Zero£¬¶øJavaÓУºNoPadding¡¢PKCS5Padding¡¢SSL3Padding
2¡¢ ¸÷×ÔĬÈϵÄ3DESʵÏÖ£¬Ä£Ê½ºÍÌî³ä·½Ê½²»Ò»Ñù
C#µÄĬÈÏģʽΪCBC,ĬÈÏÌî³ä·½Ê½ÎªPKCS7; javaµÄĬÈÏģʽ ......