Java¶ÔÏóXMLÐòÁл¯¿ò¼Ü£Simple2.0
Java¶ÔÏóXMLÐòÁл¯¿ò¼Ü£Simple2.0
SimpleÊÇÒ»¸öXMLÐòÁл¯¿ò¼Ü£¬Ò»¸öJava
°æ±¾¿íÈݵÄÐòÁл¯¿ò¼Ü£¬Äܹ»¿ìËÙÔÚJava
ƽ̨ÉÏ¿ª·¢XML¡£Ö§³Öͨ¹ýannotationsÍêÈ«ÅäÖû¯µÄXML½á¹¹£»Ìṩ°æ±¾¹ÜÀí¿ò¼ÜÔÊÐíÏòÇ°ºÍÏòºó¼æÈÝÐòÁл¯£»¸üºÃµÄÐÔÄÜ£¬Ê¹ÓÃÇáÁ¿¼¶StAXÌáÉýXML·´ÐòÁл¯
½ø³Ì£¬±ÈXStreamºÍJAXB¸ü¿ì£»Í¨¹ýnamespace annotationsÌṩÍêÈ«µÄÃüÃû¿Õ¼äÖ§³Ö£»°üÀ¨XMLÄ£°åϵͳ
Ä¿Ç°×îа汾Ϊ 2.0.1. ¹ÙÍøµØÖ·:http://simple.sourceforge.net/home.php
×¢£º²»¹ý±ÊÕßÈÏΪ£¬Èç¹ûÄãʹÓÃJavaSE 6.0£¬Ôò½¨ÒéʹÓÃÆä×Ô´øµÄJAXB
(Java Architecture for XML Binding).ÆäʹÓ÷dz£¼òµ¥£¬Ö§³Öͨ¹ýannotationsÍêÈ«ÅäÖû¯µÄXML½á¹¹¡£¶øÇÒÆäÒ²ÊÇJavaÖеÄÒ»¸ö¹æ·¶ÊµÏÖ£¬ JAX-RS¹æ·¶
¾ÍʹÓÃJAXBÀ´ÊµÏÖ¶ÔÏóµÄÐòÁл¯¹¦ÄÜ¡£
ÏÂÃæÊÇÒ»¸ö¼òµ¥Ê¾Àý:
Ïȶ¨ÒåÒ»¸öExample¶ÔÏó£¬ ÎÒÃÇÖ»ÐèÒª¼òµ¥µÄ¼ÓÉÏAnnoationºó£¬¾Í¿ÉÒÔ½øÐжÔÏóÓëXMLÖ®¼äµÄת»»¡£
@Root
public
class
Example {
@Element
private
String text;
@Attribute
private
int
index;
public
Example() {
super
();
}
public
Example(String text,
int
index) {
this
.text
=
text;
this
.index
=
index;
}
public
String getMessage() {
return
text;
}
public
int
getId() {
return
index;
}
}
½øÐÐXMLÐòÁл¯²Ù×÷:
Serializer serializer
=
new
Persister();
Example example
=
new
Example(
"
Example message
"
,
123
);
File result
=
new
File(
"
example.xml
"
);
serializer.write(example,&
Ïà¹ØÎĵµ£º
XMLÏÖÔÚÒѾ³ÉΪһÖÖͨÓõÄÊý¾Ý½»»»¸ñʽ,ËüµÄƽ̨ÎÞ¹ØÐÔ,ÓïÑÔÎÞ¹ØÐÔ,ϵͳÎÞ¹ØÐÔ,¸øÊý¾Ý¼¯³ÉÓë½»»¥´øÀ´Á˼«´óµÄ·½±ã¡£¶ÔÓÚXML±¾ÉíµÄÓ﷨֪ʶÓë¼¼Êõϸ½Ú,ÐèÒªÔĶÁÏà¹ØµÄ¼¼ÊõÎÄÏ×,ÕâÀïÃæ°üÀ¨µÄÄÚÈÝÓÐDOM(Document Object Model),DTD(Document Type Definition),SAX(Simple API for XML),XSD(Xml Schema Definition),XSLT(Exten ......
ÉùÃ÷£º
ÒÔϵÄÀý×Ó²»Ò»¶¨ÕýÈ·£¬Ö»ÊÇΪÁËÑÝʾ´ó¸ÅµÄÁ÷³Ì¡£
Ò»£ºÎÞ·µ»ØÖµµÄ´æ´¢¹ý³Ì
´æ´¢¹ý³ÌΪ£º
CREATE OR REPLACE PROCEDURE TESTA(PARA1 IN VARCHAR2,PARA2 IN VARCHAR2) AS
BEGIN
INSERT INTO HYQ.B_ID (I_ID,I_NAME) VALUES (PARA1, PARA2);
END TESTA;
È»ºóÄØ£¬ÔÚjavaÀïµ÷ÓÃʱ¾ÍÓÃÏÂÃæµÄ´ ......
<!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:ËÎÌå;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@SimSun&qu ......
JAVAµÄ¿çƽ̨µÄÌØÐÔÉîÊÜjava³ÌÐòÔ±ÃǵÄϲ°®,µ«ÕýÊÇÓÉÓÚËüΪÁËʵÏÖ¿çƽ̨µÄÄ¿µÄ,ʹµÃËüºÍ±¾µØ»úÆ÷µÄ¸÷ÖÖÄÚ²¿ÁªÏµ±äµÃºÜÉÙ,´ó´óÔ¼ÊøÁËËüµÄ¹¦ÄÜ,±ÈÈçÓëһЩӲ¼þÉ豸ͨÐÅ,ÍùÍùÒª»¨·ÑºÜ´óµÄ¾«Á¦È¥Éè¼ÆÁ÷³Ì±àд´úÂëÈ¥¹ÜÀíÉ豸¶Ë¿Ú,¶øÇÒÓÐһЩÉ豸³§ÉÌÌṩµÄÓ²¼þ½Ó¿ÚÒѾ¾¹ýÒ»¶¨µÄ·â×°ºÍ´¦Àí,²»ÄÜÖ±½ÓʹÓÃjava³ÌÐòͨ¹ý¶Ë¿ÚºÍÉè±¸Í ......
¼øÓÚÅÀ³æ¿ª·¢ÐèÒªÒ»¸öͼƬ½âÎö¹¦Äܵĺ¯Êý£¬µ½ÍøÂçÉϲéÕÒÁËһЩjni·½ÃæµÄÄÚÈÝ£¬²¢×öÁË×Ô¼ºµÄһЩÐ޸ģ¬¾ßÌåÈçÏ£º
Ä¿Ç°javaÓëdll½»»¥µÄ¼¼ÊõÖ÷ÒªÓÐ3ÖÖ£ºjni£¬jawinºÍjacob¡£Jni£¨Java Native Interface£©ÊÇsunÌṩµÄjavaÓëϵͳÖеÄÔÉú·½·¨½»»¥µÄ¼¼Êõ£¨ÔÚwindows\linuxϵͳÖУ¬ÊµÏÖjavaÓënative method»¥µ÷£©¡£ ......