java²Ù×÷xmlÎÊÌâ - Java / Web ¿ª·¢
ÎÒÏëÓÃjava¶ÁÈ¡Êý¾Ý¿â£¬²Ù×÷xmlÎļþ£¬Éú³ÉÏÂÃæµÄxmlÎļþ£¬ÇëÎÊÈçºÎʵÏÖ£º <?xml version="1.0" encoding="utf-8"?> <data> <newsid> <project mytitle="±êÌâ1" mypic="images/01.jpg" links="http://www.xxx.com/" /> <project mytitle="±êÌâ2" mypic="images/02.jpg" links="http://www.xxx.com/" /> </newsid> </data>
¿ÉÒÔÓÃStringBuffer£¬½«XMLµÄ±êÇ©ºÍÊý¾Ý¿âÈ¡µÃµÄÊý¾ÝÆ´³ÉÒ»¸ö³¤µÄString,È»ºóÊä³ö³ÉXMLÎļþ¾Í¿ÉÒÔ¡£ÒýÓà ¿ÉÒÔÓÃStringBuffer£¬½«XMLµÄ±êÇ©ºÍÊý¾Ý¿âÈ¡µÃµÄÊý¾ÝÆ´³ÉÒ»¸ö³¤µÄString,È»ºóÊä³ö³ÉXMLÎļþ¾Í¿ÉÒÔ¡£ ͬÒ⣬ÕâÑùÔËÐÐЧÂʸßÒýÓà ¿ÉÒÔÓÃStringBuffer£¬½«XMLµÄ±êÇ©ºÍÊý¾Ý¿âÈ¡µÃµÄÊý¾ÝÆ´³ÉÒ»¸ö³¤µÄString,È»ºóÊä³ö³ÉXMLÎļþ¾Í¿ÉÒÔ¡£ ÄÜ˵µÄ¾ßÌåµãô£¬ÎÒ²»Ì«¶®Õâ¿é£¬×îºÃÊÇÓиöÀý×Ó²ÎÕÕһϣ¬Ð»Ð» TabsDocument µ÷ÓÃÕâÀïÓõ½ÁËXML Beans£¬ÄãµÄÖ±½Ó¿ÉÒÔ´ÓÊý¾Ý¿âÈ¡Êý¾ÝÒýÓà public void doPress(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { response.setContentType("text/html"); String provinceCode=request.getParamet¡¡ Óе㿴²»¶® Äã¿ÉÒÔÓÃÒ»ÏÂJAXB£¬×Ô¼ºÏȶ¨ÒåºÃXSD
Ïà¹ØÎÊ´ð£º
Ò»¸öJSPÒ³Ãæ½ÓÊÕÆäËûÒ³ÃæÌá½»¹ýÀ´µÄFORM±íµ¥£¬µ«ÊÇÒªÇóÖ»½ÓÊÕµ±Ç°Õ¾µã¼°Æä×ÓÕ¾µãÌá½»¹ýÀ´µÄFORM±íµ¥£¬ÆäËûÕ¾µãÌá½»¹ýÀ´µÄ±íµ¥²»½ÓÊÕ£¬Õâ¸öÔõôÉèÖã¿ ÓùýÂËÆ÷ filter ½«µ±Ç°Õ¾µã¼°Æä×ÓÕ¾µã·ÅÒ»¸öĿ¼ È» ......
JSPÒ³ÃæÖÐÓжà¸öradio°´Å¥ JSPÒ³Ãæ½«²ÎÊýPOST¸øservlet ÒªÇóÈçÏÂ; 1.Ñ¡ÔñÒ»¸öradio£¬µ÷ÓÃservlet servletÖиù¾Ý²ÎÊýµ÷ÓÃÆäËû½Ó¿Ú£¬³ý·ÇÑ¡ÖиÃradio²¢µã»÷JSPÖеÄʵР......
¸÷·´óÏÀ¸ø¸ö˼·£¬²»ÊÇÔÚÏßµÄÄÇÖÖ£¬¾ÍÊÇÒ»¸ö×öÆÕͨµÄÓ¦ÓóÌÐò¡£ ´Ê¿âÔõôÉú³ÉÄØ£¿ ²»»á¡£ ÒýÓà ´Ê¿âÔõôÉú³ÉÄØ£¿ ÕÒ±¾×Öµä ÒýÓà ´Ê¿âÔõôÉú³ÉÄØ£¿ Êý¾Ý¿â ºÇºÇ ÓÃmap ¼üÖµ¶ÔÓ¦ Èç¹ûÓÃÊý¾Ý¿ ......
Private Sub Command1_Click() Dim MyString() As String Open "a.xml" For Binary As #1 ' ´ò¿ª¸Õ´´½¨µÄÎļþ¡£ ReDim MyString(LOF(1) - 1) Put #1, , MyRecord ' ¶ÁÈëËùÓÐ×Ö·ûµ½±äÁ¿ÖÐ ......
ÎÒдÁ˸öjspÒ³Ãæ£¬È»ºó¸Ä¶¯ÁËһϣ¬¸Ä¶¯µÄÄÚÈݾÍÊÇÔÚjspÒ³ÃæµÄjsº¯ÊýÀï¼ÓÁ˸öalert()Óï¾ä£¬µ«ÊÇÎÒ·ÃÎÊÕâ¸öÒ³ÃæÊ±£¬ËÀ»î¶¼ÊÇÔÀ´Ò³ÃæµÄÄÚÈÝ£¬ÎÒ¼ÓÁ˺ܶàalertº¯Êý»¹ÊÇû¸Ä¶¯Ç°µÄÒ³ÃæÄÚÈÝ£»tomcatÖØÆôÁË£¬Ò²ÖØÐ²¿ÊðÕâ ......