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

spring xmlÖеÄpropery µÄnameÊôÐÔÃû×ÔÀ´Ô´

½ñÌìÔÚÔËÓÃspringµÄPropertyPlaceholderConfigurerʱ·¢ÏÖÒ»¸öÓÐÒâ˼µÄÄÚÈÝ£¬µ±ÄãÔÚapplicationContextÖÐÅäÖÃÒ»¸öPropertyPlaceholderConfigurerµÄbeanʱ£¬ÓÐlocationºÍlocationsµÄÊôÐÔ£¬²»Ã÷˼Òâlocation¶ÔÓ¦Ò»¸ö.propertiesÎļþ£¬
locations¶ÔÓ¦¶à¸ö.propertiesÎļþ£¬³å×ÅÏë¿´Ò»ÏÂPropertyPlaceholderConfigurerµÄʵÏÖ»úÖÆ£¬ÓÚÊDz鿴ÁËspringµÄÔ´Â룬·¢ÏÖÔÚPropertyPlaceholderConfigurerÖв¢Ã»ÓÐlocationºÍlocationsµÄÊôÐÔ£¬ÓÚÊÇһ·ÏòÉÏÔÚ¸¸ÀàPropertiesLoaderSupportÖÐÕÒµ½ÁËlocationsµÄÊôÐÔ£¬µ«ÊÇûÓÐlocationÊôÐÔ£¬Ææ¹Ö£¿µ«ÔÚPropertiesLoaderSupportÖÐÈ´ÓÐsetLocationºÍsetLocationsÁ½¸ö·½·¨£º
/**
  * Set a location of a properties file to be loaded.
  * <p>Can point to a classic properties file or to an XML file
  * that follows JDK 1.5's properties XML format.
  */
 public void setLocation(Resource location) {
  this.locations = new Resource[] {location};
 }
 /**
  * Set locations of properties files to be loaded.
  * <p>Can point to classic properties files or to XML files
  * that follow JDK 1.5's properties XML format.
  */
 public void setLocations(Resource[] locations) {
  this.locations = locations;
 }
ÕâÑù¿´À´applicationContext.xmlÖеÄbeanµÄpropertyµÄnameÊôÐÔµÄÖµ£¬²¢²»ÊǺͶÔÓ¦ÀàÀàÖеÄÊôÐÔÄÚÈÝÊÇÒ»ÖµÄ


Ïà¹ØÎĵµ£º

DataSet XMl DateTable »¥×ª

/// <summary>
/// DataTable-------------------->XML --String
/// </summary>
public static String ToXmlString(DataTable dt)
{
StringWriter tr = new StringWriter();
try
{
dt.WriteXml(tr); ......

java ×Ô¼º×öµÄ¶ÔXMLÎļþµÄ¶Áд²Ù×÷

XMLÎļþʵÀý£º
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Context>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Resource auth="Container" maxActive="20" name="sss" password="123"
type="javax.sql.DataSource" />
<Resource auth="Container" ......

ʲôÊÇxml processing instruction(PI)£¿

from:
http://zhidao.baidu.com/question/67891842.html?si=1
ÏÂÃæµÄÒ»ÐоÍÊÇÔÚµÚ¶þ±¾ÊéµÄ¶¨Òå֮ǰµÄ£º
<?page render multiple authors ?>
ËäÈ»Ëü¿´ÉÏÈ¥ºÜÏñXMLÐòÑÔ£¬µ«Êµ¼ÊÉÏÊÇÒ»ÖÖ³ÆΪ´¦ÀíÖ¸Áprocessing instruction£©µÄ²»Í¬ÀàÐ͵ÄÓï·¨¡£´¦ÀíÖ¸ÁÒÔϼò³ÆPI£©µÄÄ¿µÄÊÇΪÁ˸ø´¦ÀíÒ³ÃæµÄ³ÌÐò£¨ÀýÈçXML½âÎöÆ ......

XmlÖÐSelectSingleNode·½·¨ÖеÄxpathÓ÷¨

×î³£¼ûµÄXMLÊý¾ÝÀàÐÍÓУºElement, Attribute£¬Comment, Text.  
 
   Element, Ö¸ÐÎÈç<Name>Tom<Name>µÄ½Úµã¡£Ëü¿ÉÒÔ°üÀ¨£ºElement, Text, Comment, ProcessingInstruction, CDATA, and EntityReference.  
 
   Attribute, Ö¸ÔÚ<Employee >ÖеĴ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ