Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JAVA¸ù¾ÝXML½Úµã¶ÁÈ¡XMLÎļþÄÚÈÝ

XMLÎļþ book.xml
<book>
<person>
<first>Kiran</first>
<last>Pai</last>
<age>22</age>
</person>
<person>
<first>Bill</first>
<last>Gates</last>
<age>46</age>
</person>
<person>
<first>Steve</first>
<last>Jobs</last>
<age>40</age>
</person>
</book>
³ÌÐòÊä³ö
Root element of the doc is book
Total no of people: 3
First Name: Kiran
Last Name: Pai
Age: 22
First Name: Bill
Last Name: Gates
Age: 46
First Name: Steve
Last Name: Jobs
Age: 40
³ÌÐòÇåµ¥
import java.io.File;
import org.w3c.dom.Document;
import org.w3c.dom.*;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
public class ReadAndPrintXMLFile{
    public static void main (String argv []){
    try {
            DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
            DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
            Document doc = docBuilder.parse (new File("book.xml"));
            // normalize text representation           
            doc.getDocumentElement ().normalize ();
            System.out.println ("Root element of the doc is " + doc.getDocumentElement().getNodeName());
            NodeList listOfPersons = doc.getElementsByTagName("person");
     


Ïà¹ØÎĵµ£º

Java ¼¼ÊõÊÇʲô£¿

Java ¼¼ÊõÊÇʲô£¿
Java ¼¼Êõ¼ÈÊÇÒ»Öָ߼¶µÄÃæÏò¶ÔÏóµÄ±à³ÌÓïÑÔ£¬Ò²ÊÇÒ»¸öƽ̨¡£Java ¼¼Êõ»ùÓÚ Java ÐéÄâ»ú£¨Java virtual machine£¬JVM£©µÄ¸ÅÄî —— ÕâÊÇÓïÑÔÓëµ×²ãÈí¼þºÍÓ²¼þÖ®¼äµÄÒ»ÖÖת»»Æ÷¡£Java ÓïÑÔµÄËùÓÐʵÏÖ¶¼±ØÐëʵÏÖ JVM£¬´Ó¶øÊ¹ Java ³ÌÐò¿ÉÒÔÔÚÓÐ JVM µÄÈκÎϵͳÉÏÔËÐС£
Java ±à³ÌÓïÑÔ£¨Java p ......

ÎÒµÄjavaѧϰÈÕ¼Ç

   load-on-startupÔªËØÒ»°ãÊÇÅäºÏservletµÄÅäÖÃʹÓõÄ,load-on-startup ÔªËØÔÚwebÓ¦ÓÃÆô¶¯µÄʱºòÖ¸¶¨ÁËservlet±»¼ÓÔØµÄ˳Ðò£¬ËüµÄÖµ±ØÐëÊÇÒ»¸öÕûÊý¡£Èç¹ûËüµÄÖµÊÇÒ»¸ö¸ºÕûÊý»òÊÇÕâ¸öÔªËØ²»´æÔÚ£¬ÄÇôÈÝÆ÷»áÔÚ¸Ãservlet±»µ÷ÓõÄʱºò£¬¼ÓÔØÕâ¸öservlet ¡£Èç¹ûÖµÊÇÕýÕûÊý»òÁ㣬ÈÝÆ÷ÔÚÅäÖõÄʱºò¾Í¼ÓÔØ²¢³õʼ»¯ ......

ʹÓÃEditPlusÅäÖÃJava±àÒë»·¾³

³õѧÕ߸üÊʺÏʹÓÃÎı¾±à¼­Èí¼þÀ´Ñ§Ï°Java£¬¶ÔJavaÓÐÒ»¶¨ÈÏʶºóÍÆ¼öʹÓÃEclipse£¬¶ÔÄÇЩҪÇ󿪷¢Ð§ÂʵijÌÐòÔ±µ±È»Ê×Ñ¡¾ÍÊÇJBuilder¡£
         ¶ÔÓÚÎı¾±à¼­Èí¼þÎÒÍÆ¼öEditPlus£¬EditPlusÊǺܶà³ÌÐòÔ±·Ç³£ÊìϤµÄ±à¼­¹¤¾ß£¬ËüÒÔÕ¼ÓÃϵͳ×Ê
ԴС¡¢²Ù×÷¼ò±ãÁé»î¡¢Ö§³ÖÎļþÀàÐͷḻ ......

RabbitÁ÷ÃÜÂëµÄJavaʵÏÖ

1. RabbitÁ÷ÃÜÂ루Rabbit Stream Cipher£©¼ò½é
      RabbitÁ÷ÃÜÂëÊÇÓÉCryptico¹«Ë¾£¨http://www.cryptico.com£©Éè¼ÆµÄ£¬ÃÜÔ¿³¤¶È128룬
×î´ó¼ÓÃÜÏûÏ¢³¤¶ÈΪ264 Bytes£¬¼´16 TB£¬ÈôÏûÏ¢³¬¹ý¸Ã³¤¶È£¬ÔòÐèÒª¸ü»»ÃÜÔ¿¶ÔʣϵÄÏûÏ¢½øÐд¦Àí¡£ËüÊÇĿǰ°²È«ÐԽϸߣ¬¼Ó/½âÃÜËٶȱȽϸßЧµÄÁ÷ÃÜÂëÖ®Ò»£ ......

java DOM ²Ù×÷XMLÎļþ

XMLÎļþÊÇÒ»ÖÖ¿ÉÀ©Õ¹ÐÔ±êʶÓïÑÔ,xmlÎļþµÄÖ÷ÒªÓÃ;:
 ×öweb¿ª·¢Ê±,¿ÉÒÔÓÃxmlÎļþÀ´×öϵͳµÄÅäÖÃ
ϵͳµÄ¼¯³É
Êý¾ÝµÄÖÐת
ÒòΪxmlÎļþÊÇ¿çÆ½Ì¨µÄ,ËùÒÔ¶ÔÓ겻ͬµÄϵͳ֮¼äµÄÊý¾ÝµÄ´«ËÍ,½»»¥¿ÉÒÔÓÃxmlÎļþÀ´ÊµÏÖ
ÏÂÃæµÄÕâ¸öÏîÄ¿Ö÷ÒªÊÇÓÃÀ´:
1,½«oracleÊý¾Ý¿âÖеÄemp±íµÄ½á¹¹¶ÁÈ¡,²¢ÇÒÉú³ÉxmlÎļþ,²¢ÇÒ½«±íÖеÄÊý¾Ýͬ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ