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

Óз´ÐÍjava ¶ÔÏóתµ½xml xstream·½Ê½

package com.jcauto.action;
import java.util.ArrayList;
import java.util.List;
public class ContentRsp {

private String resultCode;

List<ContentInfo> contentList = new ArrayList<ContentInfo>();

public void addContent(ContentInfo contentInfo) {
contentList.add(contentInfo);
}
public void removeContent(ContentInfo contentInfo) {
contentList.remove(contentInfo);
}

public String getResultCode() {
return resultCode;
}
public void setResultCode(String resultCode) {
this.resultCode = resultCode;
}
}
package com.jcauto.action;
public class ContentInfo {
private String contentName;
private String contentId;
private String dispritiong;
private String catalogId;
private String title;
public String getContentName() {
return contentName;
}
public void setContentName(String contentName) {
this.contentName = contentName;
}
public String getContentId() {
return contentId;
}
public void setContentId(String contentId) {
this.contentId = contentId;
}
public String getDispritiong() {
return dispritiong;
}
public void setDispritiong(String dispritiong) {
this.dispritiong = dispritiong;
}
public String getCatalogId() {
return catalogId;
}
public void setCatalogId(String catalogId) {
this.catalogId = catalogId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}

}


Ïà¹ØÎĵµ£º

JNAʵÏÖJavaµ÷ÓÃFortran

Ôڳɹ¦ÊµÏÖJavaµ÷ÓÃC++Ö®ºó£¬½ÓÏÂÀ´Ïëµ½ÄÜ·ñͨ¹ýJNAʵÏÖJavaµ÷ÓÃFortran£¬½ñÌìÊÔÑéÁËһϣ¬»¹ÊDZȽÏÈÝÒ׵ġ£
ÍøÉÏÓÐÒ»¸öJavaµ÷ÓÃF95µÄÀý×Ó£¬µ«ÊÇÎÒ¿¼ÂDz»½öҪʵÏÖF95µÄµ÷Ó㬻¹ÒªÊµÏÖF77µÄµ÷Óã¬ËùÒÔ·ÑÁËһЩÖÜÕÛ¡£
ÎÊÌâµÄ¹Ø¼üÔÚÓÚF77Ϊ¹ý³ÌÃû×Ô¶¯Ìí¼ÓÁËÒ»¸öβ²¿µÄÏ»®Ïߣ¬ËùÒÔsub1Õâ¸ö¹ý³Ì£¬µ½JavaÒ»¶Ë£¬¾Í±ä³ÉÁËsub1_£¬ ......

ʹÓÃJavaµÈ±ÈÀýËõ·ÅͼÏñ

±¾ÎÄת×Ôhttp://blog.csdn.net/nokiaguy/archive/2010/04/16/5493817.aspx
Ëõ·ÅͼÏñµÄ»ù±¾Ô­ÀíÊÇ´´½¨Ò»¸öÄ¿±ê´óСµÄ»­²¼£¬È»ºó¶ÁȡԴͼÏñ£¬²¢½«¸ÃͼÏñ»æÖÆÕâ¸ö»­²¼ÉÏ¡£ÎªÁËʹ³ÌÐòͨÓã¬Ô´Í¼ÏñºÍËõ·ÅºóµÄÄ¿±êͼÏñÓ¦Ó÷ֱðʹÓÃ
InputStreamºÍOutputStreamÀ´±íʾ£¬´úÂëÈçÏ£º
    
public
 
st ......

java ¶Áдxml

ʹÓÃDOM·½Ê½£¬Java½âÎöXML»ù±¾²½Öè:
Ê×ÏÈ£¬ÎÒÃÇÐèÒª½¨Á¢Ò»¸ö½âÎöÆ÷¹¤³§¡£
DocumentBuilderFactory dbf=DocumentBuilderFactory.newInstance();
È»ºó¿ÉÒÔÀûÓÃÕâ¸ö¹¤³§À´»ñµÃÒ»¸ö¾ßÌåµÄ½âÎö¶ÔÏó¡£
DocumentBuilder builder=dbf.newDocumentBuilder();
DocumentBuilderµÄParse()·½·¨½ÓÊÜÒ»¸öXMLÎĵµÃû×÷ΪÊäÈë²ÎÊý£¬·µ»ØÒ ......

xmlÎļþ²Ù×÷С½á ¹ØÓÚ·½·¨SelectSingleNodeµÄÓ÷¨

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