锘??xml version="1.0" encoding="utf-8" standalone="yes"?>在线精品国精品国产尤物884a
,久久er99热精品一区二区三区,成人一区视频 http://www.aygfsteel.com/sitinspring/category/28145.htmlA man dose his can util the destiny was revealed. zh-cn Sat, 23 Feb 2008 20:19:06 GMT Sat, 23 Feb 2008 20:19:06 GMT 60 Tomcat宸ョ▼涓殑log4j閰嶇疆 http://www.aygfsteel.com/sitinspring/archive/2008/02/16/180182.html濡傚潗鏄ラ 濡傚潗鏄ラ Sat, 16 Feb 2008 05:53:00 GMT http://www.aygfsteel.com/sitinspring/archive/2008/02/16/180182.html http://www.aygfsteel.com/sitinspring/comments/180182.html http://www.aygfsteel.com/sitinspring/archive/2008/02/16/180182.html#Feedback 0 http://www.aygfsteel.com/sitinspring/comments/commentRss/180182.html http://www.aygfsteel.com/sitinspring/services/trackbacks/180182.html 闃呰鍏ㄦ枃 ]]> 鍒嗛〉SQL璇彞鍒嗘瀽錛圤racle鏁版嵁搴擄級(jí) http://www.aygfsteel.com/sitinspring/archive/2008/02/14/179911.html濡傚潗鏄ラ 濡傚潗鏄ラ Thu, 14 Feb 2008 05:05:00 GMT http://www.aygfsteel.com/sitinspring/archive/2008/02/14/179911.html http://www.aygfsteel.com/sitinspring/comments/179911.html http://www.aygfsteel.com/sitinspring/archive/2008/02/14/179911.html#Feedback 0 http://www.aygfsteel.com/sitinspring/comments/commentRss/179911.html http://www.aygfsteel.com/sitinspring/services/trackbacks/179911.html 闃呰鍏ㄦ枃 ]]> 鐢ㄤ簬灝嗗璞℃寔涔呭寲鍒癤ML鏂囦歡浠ュ強(qiáng)璇誨彇錛屽垹闄ょ殑鎸佷箙鍖栫被錛坉om4j,xstream瀹炵幇錛?/title> http://www.aygfsteel.com/sitinspring/archive/2008/01/09/173856.html濡傚潗鏄ラ 濡傚潗鏄ラ Tue, 08 Jan 2008 17:21:00 GMT http://www.aygfsteel.com/sitinspring/archive/2008/01/09/173856.html http://www.aygfsteel.com/sitinspring/comments/173856.html http://www.aygfsteel.com/sitinspring/archive/2008/01/09/173856.html#Feedback 0 http://www.aygfsteel.com/sitinspring/comments/commentRss/173856.html http://www.aygfsteel.com/sitinspring/services/trackbacks/173856.html 鍦ㄦ綾葷殑甯姪涓嬶紝浣犱笉蹇呭叧娉ㄧ粏鑺傚氨鑳藉皢瀵硅薄鎸佷箙鍖栧埌XML鏂囦歡浠ュ強(qiáng)璇誨彇錛屽垹闄わ紝鍙湁鏇存柊楹葷儲(chǔ)涓鐐癸紝浣犻渶瑕佸厛鍒犻櫎鍐嶆坊鍔犮? 闃呰鍏ㄦ枃 ]]> 浣跨敤鍙嶅皠綆鍖栫箒鐞愮殑瀵瑰璞℃垚鍛樿鍊煎彇鍊肩殑榪囩▼緇?/title> http://www.aygfsteel.com/sitinspring/archive/2008/01/05/172970.html濡傚潗鏄ラ 濡傚潗鏄ラ Sat, 05 Jan 2008 07:10:00 GMT http://www.aygfsteel.com/sitinspring/archive/2008/01/05/172970.html http://www.aygfsteel.com/sitinspring/comments/172970.html http://www.aygfsteel.com/sitinspring/archive/2008/01/05/172970.html#Feedback 3 http://www.aygfsteel.com/sitinspring/comments/commentRss/172970.html http://www.aygfsteel.com/sitinspring/services/trackbacks/172970.html 闃呰鍏ㄦ枃 ]]> 浣跨敤鍙嶅皠綆鍖栫箒鐞愮殑瀵瑰璞℃垚鍛樿鍊煎彇鍊肩殑榪囩▼ http://www.aygfsteel.com/sitinspring/archive/2008/01/03/172455.html濡傚潗鏄ラ 濡傚潗鏄ラ Thu, 03 Jan 2008 05:49:00 GMT http://www.aygfsteel.com/sitinspring/archive/2008/01/03/172455.html http://www.aygfsteel.com/sitinspring/comments/172455.html http://www.aygfsteel.com/sitinspring/archive/2008/01/03/172455.html#Feedback 0 http://www.aygfsteel.com/sitinspring/comments/commentRss/172455.html http://www.aygfsteel.com/sitinspring/services/trackbacks/172455.html 闃呰鍏ㄦ枃 ]]> 浣跨敤娉涘瀷綾葷畝鍖栨湇鍔″眰(Service)綾葷殑璁捐 http://www.aygfsteel.com/sitinspring/archive/2007/12/28/171243.html濡傚潗鏄ラ 濡傚潗鏄ラ Fri, 28 Dec 2007 08:47:00 GMT http://www.aygfsteel.com/sitinspring/archive/2007/12/28/171243.html http://www.aygfsteel.com/sitinspring/comments/171243.html http://www.aygfsteel.com/sitinspring/archive/2007/12/28/171243.html#Feedback 2 http://www.aygfsteel.com/sitinspring/comments/commentRss/171243.html http://www.aygfsteel.com/sitinspring/services/trackbacks/171243.html 闃呰鍏ㄦ枃 ]]> 鏍?wèi)鐘毒l撴瀯鐨勬寔涔呭寲紺轟緥(XML瀹炵幇鎸佷箙灞? http://www.aygfsteel.com/sitinspring/archive/2007/12/19/168757.html濡傚潗鏄ラ 濡傚潗鏄ラ Wed, 19 Dec 2007 07:10:00 GMT http://www.aygfsteel.com/sitinspring/archive/2007/12/19/168757.html http://www.aygfsteel.com/sitinspring/comments/168757.html http://www.aygfsteel.com/sitinspring/archive/2007/12/19/168757.html#Feedback 0 http://www.aygfsteel.com/sitinspring/comments/commentRss/168757.html http://www.aygfsteel.com/sitinspring/services/trackbacks/168757.html
渚嬩腑浣跨敤鐨勬暟鎹粨鏋勪負(fù)鏍囩緇撴瀯,濡侸ava鍖呮嫭J2EE鍜孞2SE,J2EE鍖呮嫭JSp,EJB絳?j2se鍖呮嫭swing,awt,applet絳?
闃呰鍏ㄦ枃 ]]> JTable甯歌鐢ㄦ硶緇嗗垯 http://www.aygfsteel.com/sitinspring/archive/2007/12/18/168425.html濡傚潗鏄ラ 濡傚潗鏄ラ Tue, 18 Dec 2007 03:04:00 GMT http://www.aygfsteel.com/sitinspring/archive/2007/12/18/168425.html http://www.aygfsteel.com/sitinspring/comments/168425.html http://www.aygfsteel.com/sitinspring/archive/2007/12/18/168425.html#Feedback 0 http://www.aygfsteel.com/sitinspring/comments/commentRss/168425.html http://www.aygfsteel.com/sitinspring/services/trackbacks/168425.html 闃呰鍏ㄦ枃 ]]> Dom4j涓嬭澆鍙?qiáng)鋴社敤Dom4j璇誨啓XML綆浠?/title> http://www.aygfsteel.com/sitinspring/archive/2007/12/16/168099.html濡傚潗鏄ラ 濡傚潗鏄ラ Sun, 16 Dec 2007 11:46:00 GMT http://www.aygfsteel.com/sitinspring/archive/2007/12/16/168099.html http://www.aygfsteel.com/sitinspring/comments/168099.html http://www.aygfsteel.com/sitinspring/archive/2007/12/16/168099.html#Feedback 0 http://www.aygfsteel.com/sitinspring/comments/commentRss/168099.html http://www.aygfsteel.com/sitinspring/services/trackbacks/168099.html sitinspring(濡傚潗鏄ラ)鍘熷垱,杞澆璇鋒敞鏄庝綔鑰呭強(qiáng)鍑哄.
瑕佷嬌鐢╠om4j璇誨啓XML鏂囨。,闇瑕佸厛涓嬭澆dom4j鍖?dom4j瀹樻柟緗戠珯鍦?http://www.dom4j.org/
鐩墠鏈鏂癲om4j鍖呬笅杞藉湴鍧:http://nchc.dl.sourceforge.net/sourceforge/dom4j/dom4j-1.6.1.zip
瑙e紑鍚庢湁涓や釜鍖?浠呮搷浣淴ML鏂囨。鐨勮瘽鎶奷om4j-1.6.1.jar鍔犲叆宸ョ▼灝卞彲浠ヤ簡(jiǎn),濡傛灉闇瑕佷嬌鐢╔Path鐨勮瘽榪橀渶瑕佸姞鍏ュ寘jaxen-1.1-beta-7.jar.
浠ヤ笅鏄浉鍏蟲搷浣?
涓.Document瀵硅薄鐩稿叧
1.璇誨彇XML鏂囦歡,鑾峰緱document瀵硅薄.
SAXReader reader = new SAXReader();
Document document = reader.read( new File( " input.xml " ));
2.瑙f瀽XML褰㈠紡鐨勬枃鏈?寰楀埌document瀵硅薄.
String text = " <members></members> " ;
Document document = DocumentHelper.parseText(text);
3.涓誨姩鍒涘緩document瀵硅薄.
Document document = DocumentHelper.createDocument();
Element root = document.addElement( " members " ); // 鍒涘緩鏍硅妭鐐?/span>
浜?鑺傜偣鐩稿叧
1.鑾峰彇鏂囨。鐨勬牴鑺傜偣.
Element rootElm = document.getRootElement();
2.鍙栧緱鏌愯妭鐐圭殑鍗曚釜瀛愯妭鐐?
Element memberElm = root.element( " member " ); // "member"鏄妭鐐瑰悕
3.鍙栧緱鑺傜偣鐨勬枃瀛?/em>
String text = memberElm.getText();
涔熷彲浠ョ敤:
String text = root.elementText( " name " );
榪欎釜鏄彇寰楁牴鑺傜偣涓嬬殑name瀛楄妭鐐圭殑鏂囧瓧.
4.鍙栧緱鏌愯妭鐐逛笅鍚嶄負(fù)"member"鐨勬墍鏈夊瓧鑺傜偣騫惰繘琛岄亶鍘?
List nodes = rootElm.elements( " member " );
for (Iterator it = nodes.iterator(); it.hasNext();) {
Element elm = (Element) it.next();
// do something
}
5.瀵規(guī)煇鑺傜偣涓嬬殑鎵鏈夊瓙鑺傜偣榪涜閬嶅巻.
for (Iterator it = root.elementIterator();it.hasNext();) {
Element element = (Element) it.next();
// do something
}
6.鍦ㄦ煇鑺傜偣涓嬫坊鍔犲瓙鑺傜偣.
Element ageElm = newMemberElm.addElement( " age " );
7.璁劇疆鑺傜偣鏂囧瓧.
ageElm.setText( " 29 " );
8.鍒犻櫎鏌愯妭鐐?
parentElm.remove(childElm); // childElm鏄緟鍒犻櫎鐨勮妭鐐?parentElm鏄叾鐖惰妭鐐?/span>
9.娣誨姞涓涓狢DATA鑺傜偣.
Element contentElm = infoElm.addElement( " content " );
contentElm.addCDATA(diary.getContent());
涓?灞炴х浉鍏?
1.鍙栧緱鏌愯妭鐐逛笅鐨勬煇灞炴?/em>
Element root = document.getRootElement();
Attribute attribute = root.attribute( " size " ); // 灞炴у悕name
2.鍙栧緱灞炴х殑鏂囧瓧
String text = attribute.getText();
涔熷彲浠ョ敤:
String text2 = root.element( " name " ).attributeValue( " firstname " );
榪欎釜鏄彇寰楁牴鑺傜偣涓媙ame瀛楄妭鐐圭殑灞炴irstname鐨勫?
3.閬嶅巻鏌愯妭鐐圭殑鎵鏈夊睘鎬?/em>
Element root = document.getRootElement();
for (Iterator it = root.attributeIterator();it.hasNext();) {
Attribute attribute = (Attribute) it.next();
String text = attribute.getText();
System.out.println(text);
}
4.璁劇疆鏌愯妭鐐圭殑灞炴у拰鏂囧瓧.
newMemberElm.addAttribute( " name " , " sitinspring " );
5.璁劇疆灞炴х殑鏂囧瓧
Attribute attribute = root.attribute( " name " );
attribute.setText( " sitinspring " );
6.鍒犻櫎鏌愬睘鎬?br />
Attribute attribute = root.attribute( " size " ); // 灞炴у悕name
root.remove(attribute);
鍥?灝嗘枃妗e啓鍏ML鏂囦歡.
1.鏂囨。涓叏涓鴻嫳鏂?涓嶈緗紪鐮?鐩存帴鍐欏叆鐨勫艦寮?
XMLWriter writer = new XMLWriter( new FileWriter( " output.xml " ));
writer.write(document);
writer.close();
2.鏂囨。涓惈鏈変腑鏂?璁劇疆緙栫爜鏍煎紡鍐欏叆鐨勫艦寮?
OutputFormat format = OutputFormat.createPrettyPrint();
format.setEncoding( " GBK " ); // 鎸囧畾XML緙栫爜
XMLWriter writer = new XMLWriter( new FileWriter( " output.xml " ),format);
writer.write(document);
writer.close();
浜?瀛楃涓蹭笌XML鐨勮漿鎹?/strong>
1.灝嗗瓧絎︿覆杞寲涓篨ML
String text = " <members> <member>sitinspring</member> </members> " ;
Document document = DocumentHelper.parseText(text);
2.灝嗘枃妗f垨鑺傜偣鐨刋ML杞寲涓哄瓧絎︿覆.
SAXReader reader = new SAXReader();
Document document = reader.read( new File( " input.xml " ));
Element root = document.getRootElement();
String docXmlText = document.asXML();
String rootXmlText = root.asXML();
Element memberElm = root.element( " member " );
String memberXmlText = memberElm.asXML();
鍏?浣跨敤XPath蹇熸壘鍒拌妭鐐?/strong>.
璇誨彇鐨刋ML鏂囨。紺轟緥
<? xml version="1.0" encoding="UTF-8" ?>
< projectDescription >
< name > MemberManagement </ name >
< comment ></ comment >
< projects >
< project > PRJ1 </ project >
< project > PRJ2 </ project >
< project > PRJ3 </ project >
< project > PRJ4 </ project >
</ projects >
< buildSpec >
< buildCommand >
< name > org.eclipse.jdt.core.javabuilder </ name >
< arguments >
</ arguments >
</ buildCommand >
</ buildSpec >
< natures >
< nature > org.eclipse.jdt.core.javanature </ nature >
</ natures >
</ projectDescription >
浣跨敤XPath蹇熸壘鍒拌妭鐐筽roject.
public static void main(String[] args) {
SAXReader reader = new SAXReader();
try {
Document doc = reader.read( new File( " sample.xml " ));
List projects = doc.selectNodes( " /projectDescription/projects/project " );
Iterator it = projects.iterator();
while (it.hasNext()) {
Element elm = (Element)it.next();
System.out.println(elm.getText());
}
}
catch (Exception ex) {
ex.printStackTrace();
}
}
]]>縐佹湁鐨勬垚鍛樿兘琚瓙綾葷戶鎵垮悧? http://www.aygfsteel.com/sitinspring/archive/2007/12/04/165288.html濡傚潗鏄ラ 濡傚潗鏄ラ Tue, 04 Dec 2007 12:42:00 GMT http://www.aygfsteel.com/sitinspring/archive/2007/12/04/165288.html http://www.aygfsteel.com/sitinspring/comments/165288.html http://www.aygfsteel.com/sitinspring/archive/2007/12/04/165288.html#Feedback 5 http://www.aygfsteel.com/sitinspring/comments/commentRss/165288.html http://www.aygfsteel.com/sitinspring/services/trackbacks/165288.html
榪欎釜鏈哄埗瀵逛簬澶嶆潅鐨勭被浣撶郴涓繚鎶ょ埗綾諱笉琚互鐢ㄥ緢鏈夊ソ澶? 闃呰鍏ㄦ枃 ]]> 閬嶅巻騫舵壒閲忓垹闄ゅ鍣ㄤ腑鍏冪礌鍑虹幇ConcurrentModificationException鍘熷洜鍙?qiáng)澶劸|?/title> http://www.aygfsteel.com/sitinspring/archive/2007/12/03/165006.html濡傚潗鏄ラ 濡傚潗鏄ラ Mon, 03 Dec 2007 13:04:00 GMT http://www.aygfsteel.com/sitinspring/archive/2007/12/03/165006.html http://www.aygfsteel.com/sitinspring/comments/165006.html http://www.aygfsteel.com/sitinspring/archive/2007/12/03/165006.html#Feedback 1 http://www.aygfsteel.com/sitinspring/comments/commentRss/165006.html http://www.aygfsteel.com/sitinspring/services/trackbacks/165006.html 闃呰鍏ㄦ枃 ]]>
主站蜘蛛池模板:
武城县 |
盖州市 |
庆阳市 |
平邑县 |
林甸县 |
巴彦县 |
元朗区 |
内乡县 |
科尔 |
海南省 |
西吉县 |
湖州市 |
赤壁市 |
冕宁县 |
红桥区 |
亳州市 |
北海市 |
房山区 |
科技 |
河津市 |
成安县 |
高碑店市 |
公主岭市 |
朝阳市 |
晋州市 |
大方县 |
昭平县 |
讷河市 |
浮山县 |
察隅县 |
余干县 |
明水县 |
伊宁市 |
肇东市 |
拉孜县 |
五大连池市 |
新巴尔虎左旗 |
曲阳县 |
岳西县 |
德阳市 |
佛教 |