javaÖÐorg.apache.commons.digesterÀàÓ÷¨
xmlÎļþÄÚÈÝ£º
<?xml version="1.0" encoding="UTF-8"?>
<channels>
<channel switchTime="20080101000101" k="1.07" n="6" s="55" channelId="0404" channelName="xxxx.xxxx.xxx.cn"/>
<channel switchTime="20080301010101" k="1.07" n="6" s="55" channelId="0405" channelName="xxxx.xxxx.xxx.cn"/>
<channel switchTime="20080301010101" k="1.07" n="6" s="55" channelId="0406" channelName="xxxx.xxxx.xxx.cn"/>
<channel switchTime="20080301010101" k="1.07" n="6" s="55" channelId="0407" channelName="xxxx.xxxx.xxx.cn"/>
<channel switchTime="20080301010101" k="1.07" n="6" s="55" channelId="0408" channelName="xxxx.xxxx.xxx.cn"/>
<channel switchTime="20080301010101" k="1.07" n="6" s="55" channelId="0409" channelName="xxxx.xxxx.xxx.cn"/>
<channel switchTime="20080301010101" k="1.07" n="6" s="55" channelId="0433" channelName="xxxx.xxxx.xxx.cn"/>
<channel switchTime="20080301010101" k="1.07" n="6" s="55" channelId="0434" channelName="xxxx.xxxx.xxx.cn"/>
<channel switchTime="20080301010101" k="1.07" n="6" s="55" channelId="0437" channelName="xxxx.xxxx.xxx.cn"/>
<channel switchTime="20080301010101" k="1.07" n="6" s="55" channelId="0435" channelName="xxxx.xxxx.xxx.cn"/>
<channel switchTime="20080301010101" k="1.07" n="6" s="55" channelId="0438" channelName="xxxx.xxxx.xxx.cn"/>
<channel switchTime="20080301010101" k="1.07" n="6" s="55" channelId="0439" channelName="xxxx.xxxx.xxx.cn"/>
<channel switchTime="20080301010101" k="1.07" n="6" s="55" channelId="0440" channelName="xxxx.xxxx.xxx.cn"/>
</channels>
import org.apache.commons.digester.Digester;
Digester digester = new Digester();
//´Ë·½·¨×÷ÓÃÊÇÊÇ·ñ¶ÔXMLÎĵµ½øÐÐDTDÑéÖ¤
digester.setValidating(false);
//addObjectCreateµÄ×÷ÓÃÊÇ£ºµ±Óö¼ûchannelsÔªËصÄʱºò£¬²úÉúÒ»¸öjava.util.ArrayList¶ÔÏó
digester.addObjectCreate("channels", "java.util.ArrayList");
//addSetProperties×÷ÓÃÊÇ£º¶ÔchannelsÔªËØËùº¬µÄÊôÐÔ¸³Öµ(¼
Ïà¹ØÎĵµ£º
Java Òì³££¨ Exception£©·ÖΪÊÜ¿ØÒì³£ºÍ²»ÊÜ¿ØÒì³£Á½ÖÖ¡£ÆäÖÐÊÜ¿ØÒì³£±ØÐëÇ¿ÖÆÖ´Ðⶻñ»òÕßÉùÃ÷£¬·ñÔò½«³öÏÖ±àÒë´íÎó¡£ ¶ÔÓÚ·ÇÊÜ
¿ØÒì³£java±àÒëÆ÷²»»á¼ì²é´úÂëÒÔÈ·¶¨ÊDz¶»ñ»òÕßÉùÃ÷²»ÊÜ¿ØÒì³£¡£¾¡¹Ü±àÒëÆ÷¶Ô²»ÊÜ¿ØÒ쳣ûÓⶻñ»òÕßÉùÃ÷µÄÇ¿ÖÆÒªÇ󣬵«ÖªµÀ·¢ÉúÕâÖÖÒ쳣ʱӦÌṩºÏÊʵÄÒì³£´¦Àí´úÂë¡£
  ......
1¡¢Óï·¨£º±ØÐë±È½ÏÊìϤ£¬ÔÚд´úÂëµÄʱºòIDEµÄ±à¼Æ÷¶ÔijһÐб¨´íÓ¦¸ÃÄܹ»¸ù¾Ý±¨´íÐÅÏ¢ÖªµÀÊÇʲôÑùµÄÓï·¨´íÎó²¢ÇÒÖªµÀÈκÎÐÞÕý¡£
2¡¢ÃüÁ±ØÐëÊìϤJDK´øµÄһЩ³£ÓÃÃüÁî¼°Æä³£ÓÃÑ¡ÏÃüÁîÖÁÉÙÐèÒªÊìϤ£ºappletviewer¡¢ HtmlConverter¡¢jar¡¢ java¡¢javac¡¢javadoc¡¢javap¡¢javaw¡¢native2ascii¡ ......
java web ¿ª·¢ ±íʾ²ã¿ò¼Ü struts jsf struts2.0 webworkµÈ
¿ØÖƲã¿ò¼Ü&nbs ......