Jdbc,Jdo,XML·½Ãæ
1¡¢Class.forNameµÄ×÷ÓÃ?ΪʲôҪÓÃ?
´ð£ºµ÷Óø÷ÃÎÊ·µ»ØÒ»¸öÒÔ×Ö·û´®Ö¸¶¨ÀàÃûµÄÀàµÄ¶ÔÏó¡£
2¡¢JdoÊÇʲô?
´ð£ºJDOÊÇJava¶ÔÏó³Ö¾Ã»¯µÄеĹ淶£¬Îªjava data objectµÄ¼ò³Æ,Ò²ÊÇÒ»¸öÓÃÓÚ´æȡijÖÖÊý¾Ý²Ö¿âÖеĶÔÏóµÄ±ê×¼»¯API¡£JDOÌṩÁË͸Ã÷µÄ¶ÔÏó´æ´¢£¬Òò´Ë¶Ô¿ª·¢ÈËÔ±À´Ëµ£¬´æ´¢Êý¾Ý¶ÔÏóÍêÈ«²»ÐèÒª¶îÍâµÄ´úÂ루ÈçJDBC APIµÄʹÓã©¡£ÕâЩ·±ËöµÄÀýÐй¤×÷ÒѾתÒƵ½JDO²úÆ·ÌṩÉÌÉíÉÏ£¬Ê¹¿ª·¢ÈËÔ±½âÍѳöÀ´£¬´Ó¶ø¼¯ÖÐʱ¼äºÍ¾«Á¦ÔÚÒµÎñÂß¼ÉÏ¡£ÁíÍ⣬JDOºÜÁé»î£¬ÒòΪËü¿ÉÒÔÔÚÈκÎÊý¾Ýµ×²ãÉÏÔËÐС£JDBCÖ»ÊÇÃæÏò¹ØϵÊý¾Ý¿â£¨RDBMS)JDO¸üͨÓã¬Ìṩµ½ÈκÎÊý¾Ýµ×²ãµÄ´æ´¢¹¦ÄÜ£¬±ÈÈç¹ØϵÊý¾Ý¿â¡¢Îļþ¡¢XMLÒÔ¼°¶ÔÏóÊý¾Ý¿â£¨ODBMS£©µÈµÈ£¬Ê¹µÃÓ¦ÓÿÉÒÆÖ²ÐÔ¸üÇ¿¡£
3¡¢Ëµ³öÊý¾ÝÁ¬½Ó³ØµÄ¹¤×÷»úÖÆÊÇʲô?
´ð£ºJ2EE·þÎñÆ÷Æô¶¯Ê±»á½¨Á¢Ò»¶¨ÊýÁ¿µÄ³ØÁ¬½Ó£¬²¢Ò»Ö±Î¬³Ö²»ÉÙÓÚ´ËÊýÄ¿µÄ³ØÁ¬½Ó¡£¿Í»§¶Ë³ÌÐòÐèÒªÁ¬½Óʱ£¬³ØÇý¶¯³ÌÐò»á·µ»ØÒ»¸öδʹÓõijØÁ¬½Ó²¢½«Æä±í¼ÇΪæ¡£Èç¹ûµ±Ç°Ã»ÓпÕÏÐÁ¬½Ó£¬³ØÇý¶¯³ÌÐò¾Íн¨Ò»¶¨ÊýÁ¿µÄÁ¬½Ó£¬Ð½¨Á¬½ÓµÄÊýÁ¿ÓÐÅäÖòÎÊý¾ö¶¨¡£µ±Ê¹ÓõijØÁ¬½Óµ÷ÓÃÍê³Éºó£¬³ØÇý¶¯³ÌÐò½«´ËÁ¬½Ó±í¼ÇΪ¿ÕÏУ¬ÆäËûµ÷ÓþͿÉÒÔʹÓÃÕâ¸öÁ¬½Ó¡£
4¡¢JdoÊÇʲô?
´ð£ºJDOÊÇJava¶ÔÏó³Ö¾Ã»¯µÄеĹ淶£¬Îªjava data objectµÄ¼ò³Æ,Ò²ÊÇÒ»¸öÓÃÓÚ´æȡijÖÖÊý¾Ý²Ö¿âÖеĶÔÏóµÄ±ê×¼»¯API¡£JDOÌṩÁË͸Ã÷µÄ¶ÔÏó´æ´¢£¬Òò´Ë¶Ô¿ª·¢ÈËÔ±À´Ëµ£¬´æ´¢Êý¾Ý¶ÔÏóÍêÈ«²»ÐèÒª¶îÍâµÄ´úÂ루ÈçJDBC APIµÄʹÓã©¡£ÕâЩ·±ËöµÄÀýÐй¤×÷ÒѾתÒƵ½JDO²úÆ·ÌṩÉÌÉíÉÏ£¬Ê¹¿ª·¢ÈËÔ±½âÍѳöÀ´£¬´Ó¶ø¼¯ÖÐʱ¼äºÍ¾«Á¦ÔÚÒµÎñÂß¼ÉÏ¡£ÁíÍ⣬JDOºÜÁé»î£¬ÒòΪËü¿ÉÒÔÔÚÈκÎÊý¾Ýµ×²ãÉÏÔËÐС£JDBCÖ»ÊÇÃæÏò¹ØϵÊý¾Ý¿â£¨RDBMS£©JDO¸üͨÓã¬Ìṩµ½ÈκÎÊý¾Ýµ×²ãµÄ´æ´¢¹¦ÄÜ£¬±ÈÈç¹ØϵÊý¾Ý¿â¡¢Îļþ¡¢XMLÒÔ¼°¶ÔÏóÊý¾Ý¿â£¨ODBMS£©µÈµÈ£¬Ê¹µÃÓ¦ÓÿÉÒÆÖ²ÐÔ¸üÇ¿¡£
5¡¢xmlÓÐÄÄЩ½âÎö¼¼Êõ?Çø±ðÊÇʲô?
´ð£ºÓÐDOM,SAX,STAXµÈ
DOM:´¦Àí´óÐÍÎļþʱÆäÐÔÄÜϽµµÄ·Ç³£À÷º¦¡£Õâ¸öÎÊÌâÊÇÓÉDOMµÄÊ÷½á¹¹ËùÔì³ÉµÄ£¬ÕâÖֽṹռÓõÄÄÚ´æ½Ï¶à£¬¶øÇÒDOM±ØÐëÔÚ½âÎöÎļþ֮ǰ°ÑÕû¸öÎĵµ×°ÈëÄÚ´æ,Êʺ϶ÔXMLµÄËæ»ú·ÃÎÊSAX:²»ÏÖÓÚDOM,SAXÊÇʼþÇý¶¯Ð͵ÄXML½âÎö·½Ê½¡£Ëü˳Ðò¶ÁÈ¡XMLÎļþ£¬²»ÐèÒªÒ»´ÎÈ«²¿×°ÔØÕû¸öÎļþ¡£µ±Óöµ½ÏñÎļþ¿ªÍ·£¬Îĵµ½áÊø£¬»òÕß±êÇ©¿ªÍ·Óë±êÇ©½áÊøʱ£¬Ëü»á´¥·¢Ò»¸öʼþ£¬Óû§Í¨¹ýÔÚÆä»Øµ÷ʼþÖÐдÈë´¦Àí´úÂëÀ´´¦ÀíXMLÎļþ£¬Êʺ϶ÔXMLµÄ˳Ðò·ÃÎÊ
STAX:Streaming API for XML (StAX)
6¡¢ÄãÔÚÏîÄ
Ïà¹ØÎĵµ£º
ÔÏÈÒ»Ö±ÓÃBinaryFormatterÀ´ÐòÁл¯Í¦ºÃ£¬¿ÉÊÇ×î½ü·¢ÏÖÔÚWinCEÏÂÊÇûÓа취½øÐÐBinaryFormatter²Ù×÷£¬ºÜ²»Ë¬£¬Ö»ÄܸijÉÁËBinaryWriterºÍBinaryReaderÀ´¶Áд£¬Í»È»Ïëµ½Äܲ»ÄÜÓÃXMLÀ´ÐòÁл¯£¿ÓÚÊÇÔÚÍøÉϲéÁËЩ×ÊÁϱãдÁËЩʵ¼ùÐÔ´úÂ룬×öЩ¼Ç¼£¬±ÜÃâÒÔºóÍü¼Ç¡£
ÐòÁл¯¶ÔÏó
public class People
......
/**
* ftpÉÏ´«ÎļþJavaBean
* @author Administrator
*
*/
public class FtpBean {
//ftp·þÎñµØÖ·
private String ftpUrl="";
//ftp̞
private String userName="";
//ftpÃÜÂë
private String passWord="";
public String getF ......
·¶ÀýÈçÏ£º
var xml:XML=
<body>
text1
<bar>barText1</bar>
& ......
/// <summary>
/// Ö§³ÖXMLÐòÁл¯µÄ·ºÐÍ Dictionary
/// </summary>
/// <typeparam name="TKey"></typeparam>
/// <typeparam name="TValue"></typeparam>
[XmlRoot("SerializableDictionary")]
public class SerializableDictionary<TKey, TValue& ......