¹ØÓÚxmlµÄ²Ù×÷£¬Java±¨xmlÎļþ²»´æÔڵĴíÎó ¼±£¡
DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
DocumentBuilder db=dbf.newDocumentBuilder();
File fl=new File("d:/xml/userdatabase.xml");
doc =db.parse(fl);
Element root=(Element)doc.getElementsByTagName("database").item(0);
NodeList nl=root.getElementsByTagName("user");
ÉÏÊöµÚËÄÐУ¬±¨Õâ¸ö´í£¬DÅÌϵÄÎļþÊÇ´æÔÚµÄ £¬²»½â £¿Çë¸ßÊÖÖ¸µã
Exception in thread "main" java.io.FileNotFoundException: d:\xml\userdatabase.xml (Ö¸¶¨¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤¬見¤Ä¤«¤ê¤Þ¤»¤ó¡£)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream. <init>(FileInputStream.java:106)
at java.io.FileInputStream. <init>(FileInputStream.java:66)
at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:70)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:161)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:973)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:184)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:798)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
Ïà¹ØÎÊ´ð£º
ÓÃRandomAccessFileдÈëTXTÎļþ²é¿´Ê±ÊÇÂÒÂ룬ÇëÎÊÓÐʲô·½·¨¿ÉÒÔд³É¿É¶ÁµÄÎļþ£¬²»ÊÇÓÃÆäËûµÄÎļþ²Ù×÷£¬¾ÍÊÇÖ»ÓÃRandomAccessFileµÄ·½·¨ÊÇ·ñ¿ÉÒÔʵÏÖ£¿
Java code:
import java.io.*;
public class RandomAcce ......
import java.sql.Connection;
import java.sql.Date;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class QueryTest&n ......
ÎÒÏ£ÍûÔÚ±à¼ÎÄ×Öºó°Ñ·¢Ëͼü¸Äµ½ÆÁÄ»Öм䣬¾ßÌå˵¾ÍÊÇ
ÔÚkb.classÖеIJ¿·Ö×÷³öÐÞ¸Ä
²¿·Ö´úÂ룺
V = new TextBox(ld.a(383), "", 190, 0);
X = new Comma ......
ÎÊÌâÊÇÕâÑùµÄ£º
ÎÒÓÐÒ»¸öÎļþnagiv.jsp ÁíÒ»¸öÎļþfailure.jsp°üº¬Ëû£¬Í¬Ê±nagivÎļþÖÐÓÐÒ»¸ö¿ÉÒÔÌø×ªµ½yy.jspµÄcommandButton£¬µ«ÊÇÎÒ½«failureÖеã»÷nagivÖеÄÄĸöcommandButton£¬Ò²Ãæ²»»áÌø×ª ......
Ïë×öÒ»¸öjspµÄµç×ÓÉÌÎñÍøÕ¾£¬ÏëÕÒһЩԴ´úÂ룬ÇëÎÊÄǸöÍøÕ¾ÓкõÄ×ÊÔ´¡£Ð»Ð»£¡
ËÑË÷Ï塃 ¿ªÔ´µÄÒ²ÓÐ
csdn¾ÍÓÐÏàËÆµÄÔ´Â룬¥Ö÷ËÑÒ»ÏÂ
java ¿ªÔ´´óÈ«
¸ÄÄ£°åºÃÂ鷳Ŷ£¬»¹²»Èç×Ô¼ºÐ´¸öÁËÄØ
jf
¶¥Ò» ......