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
Ïà¹ØÎĵµ£º
package com.project.ajaxs;
import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.util.Calendar;
import java.uti ......
ÎÒÏÖÔÚÒѾ´óËÄÁË£¬Ñ§µÄÊÇÈí¼þרҵ£¬ÎÒ±ØÐë³ÐÈÏÎÒÃÇѧУµÄÈí¼þרҵºÜ²»ºÃ£¬ËùÒԴ󲿷ÖÒª¿¿×Ô¼º¡£
ÒÔǰ´ÓÀ´Ã»Ð´¹ý²©¿Í£¬Õâ´ÎÔÚÕâÀ↑²©¾ÍÊÇÏëͨ¹ýcsdn½áʶ¸ü¶àµÄѧϰJAVAµÄÅóÓÑ£¬ÎÒÉîÖª×Ô¼ºµÄJAVA¹¦µ×Éõdz£¬ËùÒÔÖ»ÓÐ×Î×β»¾ëµÄϰ£¬ºÍ²»ÑáÆä·³µÄ·¢ÎʲÅÄÜʹ×Ô¼ºÇ¿´ó¡£
×î½üÎÒÒ²´ÓÍøÉ ......
1¡¢ÔÚoracleµÄsys-sysdbaϵǽ
дһ¸öjava source³ÌÐòÁ´½Ósqlserver2005£º
create or replace and compile java source named test as
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
public class excutesql1
{
public static String entry ......
XMLÎļþÊÇÒ»ÖÖ¿ÉÀ©Õ¹ÐÔ±êʶÓïÑÔ,xmlÎļþµÄÖ÷ÒªÓÃ;:
×öweb¿ª·¢Ê±,¿ÉÒÔÓÃxmlÎļþÀ´×öϵͳµÄÅäÖÃ
ϵͳµÄ¼¯³É
Êý¾ÝµÄÖÐת
ÒòΪxmlÎļþÊÇ¿çÆ½Ì¨µÄ,ËùÒÔ¶ÔÓ겻ͬµÄϵͳ֮¼äµÄÊý¾ÝµÄ´«ËÍ,½»»¥¿ÉÒÔÓÃxmlÎļþÀ´ÊµÏÖ
ÏÂÃæµÄÕâ¸öÏîÄ¿Ö÷ÒªÊÇÓÃÀ´:
1,½«oracleÊý¾Ý¿âÖеÄemp±íµÄ½á¹¹¶ÁÈ¡,²¢ÇÒÉú³ÉxmlÎļþ,²¢ÇÒ½«±íÖеÄÊý¾Ýͬ ......
Java SwingÖеÄJTreeÄ£ÐÍ
2009-01-04 10:40
±¾ÎĽéÉÜJava SwingÖеÄJTreeÄ£ÐÍ£¬½éÉÜÈçºÎ´´½¨¡¢Ð޸ġ¢±éÀú£¬ÉèÖÃÊ÷¡£²Î¿¼Core Java2Ïà¹ØÕ½ڼ°ÆäÔ´´úÂë¡£
SwingÊ÷ʹÓÃÈËÃÇËùÊìϤµÄÎļþ¼ÐºÍÊ÷ҶͼÀ´ÏÔʾ·Ö²ãµÄÊý¾Ý¡£Ê÷Óɽڵã×é³É£¬½Úµã¿ÉÒÔÊÇÎļþ¼Ð£¬Ò²¿ÉÒÔÊÇÊ÷Ò¶¡£Îļþ¼Ð¿ÉÒÔÓÐ×ӽڵ㣬³ý¸ù½ÚµãÖ®ÍâµÄËùÓнڵ㶼ֻÓÐÒ»¸ö¸ ......