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

¼¦¼¦¼¦£¬xml½âÎö·¾¶ÎÊÌâ¡£

ÎÒµÄ sysconf.xml Îļþ·ÅÔÚSRC Ŀ¼ÏµÄ
ÎÒÔÚÀàÀïÃæ»ñÈ¡µÄ·¾¶
public class Colligate {

// ÅäÖÃÎļþ¾ßÌå·¾¶
public static String CONFIGXMLFILE = "\\WEB-INF\\classes\\sysconf.xml";
 
}
ÎÒÔÚÁíÍâÒ»¸öÀàÀïÃæ½âÎöÕâ¸öxmlÎļþ
public SysConf() {

readConfig();

}
public void readConfig() {
SAXBuilder sb = new SAXBuilder();
try {
Document doc = sb.build(new FileInputStream(Colligate.CONFIGXMLFILE));


È»ºóÎÒÔÚactionÀïÃæ String key = new SysConf().getKey();  ÕâÑù×Ó»ñÈ¡keyµÄÖµ£¬
½á¹û¾Í±¨´í
java.io.FileNotFoundException: \WEB-INF\classes\sysconf.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 com.sshTest.common.SysConf.readConfig(SysConf.java:104)
at com.sshTest.common.SysConf. <init>(SysConf.java:24)

ÊÔÁ˺ܶà·¾¶£¬½á¹û»¹ÊDz»ÐС£ÕâÊÇΪʲô°¡£¡£¡£¡
public static String CONFIGXMLFILE = "WEB-INF/classes/sysconf.xml";

ÏÈÈ·¶¨ÊdzÌÐòÖ´Ðе½¾ßÌåÄÇÒ»ÐоÍÍ£Ö¹
δ±ØÊÇ·¾¶ÎÊÌâ

Ö±½Ósysconf.xml¾Í¿ÉÒÔ¡£

WebRoot/WEB-INF/hell.xml
»òÕß
WebRoot/WEB-INF/classes/hell.xml
ÄãµÄsysconf.xmlÊÇÔÚÏîÄ¿ÖеÄλÖÃsrc»¹ÊÇWEB-INFÖÐ


Ïà¹ØÎÊ´ð£º

XML Schema ÎÊÌâ

ÇóÖú¸÷λ´óϺ£¬Ñ§Éú³É¼¨µ¥XML SchemaµÄÉè¼Æ,XMLÎĵµµÄÉè¼Æ£¬°üº¬µÄÖ÷ÒªÐÅÏ¢£ºÑ§ºÅ¡¢Ñ§ÉúÐÕÃû¡¢Ïµ²¿¡¢°à¼¶¡¢¿¼ÊÔÈÕÆÚ¡¢ÈονÌʦ¡¢Ñ§·Ö¡¢Ñ§Ê±¡¢ÐÞϰÀà±ð¡¢Java³ÌÐòÉè¼Æ³É¼¨,ÍøÂç»ù´¡ÖªÊ¶³É¼¨¡¢ÍøÒ³ÖÆ×÷³É¼¨¡¢Èí¼þ¹¤³Ì³ ......

VSÖÐxmlÎļþµÄÖÐÓ¢ÎÄÏÔʾÑÕÉ«²»Ò»Ñù£¿

<?xml version="1.0" encoding="gb2312" ?>
<sites>
<site>
<name>.Net¿ª·¢ÕßÔ°µØ</name>
<url>http://dotnet.aspx.cc</url>
<img&g ......

»ùÓÚXML¼¼ÊõµÄÍøÒ³ÄÚÈÝÌáÈ¡

ÈçÌâ
ÎÒÕâѧÆÚÑ¡µÄ¿ÎÌâÊÇÕâ¸öµ«ÊDz»ÖªµÀ¸ÃÔõô׼±¸£¬µ¼Ê¦Ò²Ã»Ôõô˵Çå³þ£¬Ï£Íû¸÷λ´ïÈËÄÜÖ¸µãÒ»¶þ£¬Ð¡µÜÔÚÕâл¹ýÀ²£¡

ллÄã £¬ÎÒÏÖÔÚÒ²×Ô¼º¿´×ÊÁÏÕûÀíË¼Â·ÄØ£¬¾ßÌåµÄ»¹ÒªÒ»µãʱ¼ä¡£
ÒýÓÃ
˼·ÈçÏ£º
ʹÓà ......

Êý¾Ý±íÉú³ÉÌØ¶¨¸ñʽµÄxml - .NET¼¼Êõ / ASP.NET

´ÓÊý¾Ý¿âÖвéѯһÕűíµÄÊý¾Ý
select ²¿ÃÅ,ÐÕÃû from tb
ÈçºÎ²ÅÄÜÉú³ÉÏÂÃæµÄxml¸ñʽÎļþ
<folder state="unchecked" label="È«²¿">
¡¡¡¡<folder state="unchecked" isBra ......

ÈçºÎÓÃASP¶ÁÈ¡ XML - Web ¿ª·¢ / ASP

<?xml version="1.0"?>
<root>
<status>433</status>
<msg>Õâ¸öÊǺº×Ö</msg>
<serialno>123</serialno>
</root>
ÈçºÎÓÃASP¶ÁÈ¡ statusÖµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ