java´´½¨Xml±Ê¼Ç
ÓÃjava´´½¨XmlµÄ4´óÀࣺ
Element£º½ÚµãÀà
AttributeÊôÐÔÀà
Document£ºÖ¸µÄ¾ÍÊÇÎĵµÀà
XMLOutput£ºÊä³öÀà
´ËÀàÊÇÓÃjava½¨Á¢Ò»¸öxmlÎļþ
public class TestJdom {
//´´½¨XML£¨Ä£ÐÍ£©dom
public static void main(String[] args) {
createXmlDom();
}
public static void createXmlDom(){
Element beans=new Element("beans");
Element bean=new Element("bean");
Attribute id=new Attribute("id","dataSource");
Attribute clazz=new Attribute("class","org.apache.commons.dbcp.BasicDataSource");
bean.setAttribute(id);
bean.setAttribute(clazz);
beans.addContent(bean);
Map<String ,String> map=new HashMap<String,String>();
map.put("driverClassName", "com.mysql.jdbc.Driver");
map.put("username", "root");
map.put("password", "root");
map.put("url", "jdbc:mysql://localhost:3306/test");
for(Map.Entry<String,String> mapEntry:map.entrySet()){
Element property=new Element("property");
property.setAttribute("name", mapEntry.getKey());
Element value=new Element("value");
value.setText(mapEntry.getValue());
&nb
Ïà¹ØÎĵµ£º
DECLARE @x xml
SET @x='
<root>
<ShopAccount>
<ActivityType>IA - PM Standing WO (for LPI report)</ActivityType>
<ProjectNo>R</ProjectNo>
</ShopAccount>
<ShopAccount>
......
²âÊÔÓõÄxmlÎļþ
<?xml version="1.0" encoding="UTF-8"?>
<schools>
<school id='111'>²âÊÔѧУ</school>
<school id='222'>²âÊÔѧУ22
<class id='2.1'>²âÊ԰༶222</class>
</school>
</schools>
²âÊÔÓõÄJavaScript´úÂë
$().ready(function ......
ÔÚlinux/unixÏ£¬ÄãÊÇÔõôÖÐÖ¹Ò»¸öjava½ø³ÌµÄ£¿
Äã¿ÉÄÜ»á»Ø´ð kill -9 pid£¬ÕâÊÇÒ»ÖÖÔÚ¶àÊýÇé¿öÏÂÕýÈ·µÄ×ö·¨¡£²»¹ý£¬ÕâÖÖ·½Ê½¹ýÓÚ±©Á¦£¬Èç¹ûÓû§¶Ô»·¾³²»ÊìϤ£¬ºÜÈÝÒ×Ôì³ÉÖÂÃüµÄºó¹û¡£
±¾ÎĽ«·ÖÎökill -9²úÉúÎÊÌâµÄÔÒò£¬²¢¸ø³öÁíÒ»ÖÖ±ê×¼µÄkill·½Ê½¡£
±ê×¼ÖжÏÐźÅ
ÔÚLinuxÐźŻúÖÆÖУ¬´æÔÚ¶àÖÖ½ø³ÌÖжÏÐźţ¨LinuxÐ ......
String url=request.getScheme()+"://";
url+=request.getHeader("host");
url+=request.getRequestURI();
  ......
Êý×飺±íʾ¶¨ÒåͬÖÖÊý¾ÝÀàÐ͵Ķà¸ö±äÁ¿
1.һάÊý×éµÄ¶¨Òå
Êý×éÔªËØµÄÊý×éÀàÐÍ[] Êý×éÃû=new Êý×éÔªËØµÄÊý¾ÝÀàÐÍ[Êý×éÔªËØµÄ¸öÊý] »ò
Êý×éÔªËØµÄÊý¾ÝÀàÐÍ Êý×éÃû[]=new Êý×éÔªË ......