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

java¶ÁÈ¡xmlÎļþµÄËÄÖÖ·½·¨

xmlÎļþ£º
Xml´úÂë
<?xml version="1.0" encoding="GB2312"?>  
<RESULT>  
 <VALUE>¡¡¡¡   
  <NO>A1234</NO>¡¡¡¡   
  <ADDR>ºÓÄÏÊ¡Ö£ÖÝÊÐ</ADDR>  
 </VALUE>  
 <VALUE>¡¡¡¡   
  <NO>B1234</NO> ¡¡   
  <ADDR>ºÓÄÏÊ¡Ö£ÖÝÊжþÆßÇø</ADDR>  
 </VALUE>  
</RESULT>   
<?xml version="1.0" encoding="GB2312"?>
<RESULT>
<VALUE>¡¡¡¡
<NO>A1234</NO>¡¡¡¡
<ADDR>ºÓÄÏÊ¡Ö£ÖÝÊÐ</ADDR>
</VALUE>
<VALUE>¡¡¡¡
<NO>B1234</NO> ¡¡
<ADDR>ºÓÄÏÊ¡Ö£ÖÝÊжþÆßÇø</ADDR>
</VALUE>
</RESULT>
 µÚÒ»ÖÖ DOM ʵÏÖ·½·¨£º
Java´úÂë
import java.io.File;   
  
import javax.xml.parsers.DocumentBuilder;   
import javax.xml.parsers.DocumentBuilderFactory;   
  
import org.w3c.dom.Document;   
import org.w3c.dom.NodeList;   
  
public class MyXMLReader2DOM {   
 public static void main(String arge[]) {   
  
  long lasting = System.currentTimeMillis();   
    
  try {   
   File f = new File("data_10k.xml");   
   DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();   
   DocumentBuilder builder = factory.newDocumentBuilder();   
   Document doc = builder.parse(f);   
   NodeList nl = doc.getElementsByTagName("VALUE");   
 &nbs


Ïà¹ØÎĵµ£º

javaѧϰÍøÖ·

1.JavaѧϰÍøÕ¾:
JavaÖÐÎÄÊÀ½çÂÛ̳        http://www.chinajavaworld.com/index.jspa
JavaÊÀ¼ÍÍø              http://www.java2000.net/
Java ÖÐÎÄÕ¾            http://www.java-cn.com/
JavaѧϰÊÒ      ......

תÌù£ºJavaÓïÑÔµÄÊ®´óÎÊÌâ¼°ÒýÉê˼¿¼

ת×Ô£ºhttp://blog.163.com/gordonkkk/blog/static/63425684200962795039630/
´ÓCSDNÉÏ¿´µ½Ò»ÆªÅúÆÀJavaÓïÑÔÖî¶àÎÊÌâµÄ·­ÒëÎÄÕ£¬Ô­ÎÄ×÷ÕßÊÇMario Fusco¡£ËûÖ¸³öÁËJavaÓïÑÔÂäºóÓÚʱ´ú£¬»ýÖØÄÑ·µµÄ10¸öÎÊÌâ¡£¿´¹ýÖ®ºóÒýÆðÁËÎÒµÄһЩÁªÏë¡£ÏÂÃæÁгöËûËù˵µÄ10´óÎÊÌâ¡£½Û»ÆÉ«×ÖÌåÊÇÎÒÒ»µãµã²»³ÉÊìµÄ˼¿¼¡£
1¡¢È±ÉÙ±Õ°ü£¨clos ......

VC++,Javaµ½µ×¸ÃѧÄǸö£¿

ÏÖÔںܶàÈ˶¼ÎÊ C++ºÍJava ÄĸöºÃ. Æäʵ¼¼ÊõÉϸ÷Óи÷µÄºÃ´¦Óë²»×ã,ÎÒÏë´ó¼ÒËù˵µÄºÃ²»ºÃÖ¸µÃÊÇǰ;ºÃ²»ºÃ,׬µÄ¶à²»¶à.
 ÒªËµ×¬Ç®×î¶àµÄ¿Ï¶¨ÊÇC++ÁË.ÒòΪһÃż¼ÊõÊÇ·ñֵǮȫ¿´»áËüµÄÈËÓжàÉÙ¶ø²»ÔÚÓÚÕâ¸ö¼¼Êõ±¾ÉíµÄºÃ»µ. C++Éæ¼°Ó²¼þµ×²ãµÄ¶«Î÷±È½Ï¶à,ѧÆðÀ´ºÜ¸´ÔÓ,»áµÄÈËÉÙ,ËùÒÔֵǮ. 
&nb ......

java¼òµ¥ÁÄÌìÊÒ

import java.awt.*;
import java.applet.*;
import java.awt.event.*;
import javax.swing.*;
public class Applet1 extends Applet implements ActionListener,ItemListener
{
  TextArea mainText;
    JTextField input;
    JButton sendButton,disconnectButton,connectBu ......

Java SwingÖеÄJTreeÄ£ÐÍ

Java SwingÖеÄJTreeÄ£ÐÍ
2009-01-04 10:40
±¾ÎĽéÉÜJava SwingÖеÄJTreeÄ£ÐÍ£¬½éÉÜÈçºÎ´´½¨¡¢Ð޸ġ¢±éÀú£¬ÉèÖÃÊ÷¡£²Î¿¼Core Java2Ïà¹ØÕ½ڼ°ÆäÔ´´úÂë¡£
SwingÊ÷ʹÓÃÈËÃÇËùÊìϤµÄÎļþ¼ÐºÍÊ÷ҶͼÀ´ÏÔʾ·Ö²ãµÄÊý¾Ý¡£Ê÷Óɽڵã×é³É£¬½Úµã¿ÉÒÔÊÇÎļþ¼Ð£¬Ò²¿ÉÒÔÊÇÊ÷Ò¶¡£Îļþ¼Ð¿ÉÒÔÓÐ×ӽڵ㣬³ý¸ù½ÚµãÖ®ÍâµÄËùÓнڵ㶼ֻÓÐÒ»¸ö¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ