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

¡¾×ª¡¿+¡¾¸Ä¡¿DOM4J´¦ÀíXML´øÓÐÃüÃû¿Õ¼äµÄËÄÖÖ·½·¨

µ±Äã½âÎöXMLʱ£¬ÊÇ·ñ»áÒòΪÃüÃû¿Õ¼äµÄ´æÔÚ¶ø²»Äܵó¥ËùÔ¸ÄØ£¿
java·½Ã棬ºÃ¶àÈËÍÆ¼öÓÃdom4j´¦Àíxml£¬ÎÒÒ²¾Í˵˵ÔÚdom4jÉÏ´¦Àí´øÃüÃû¿Õ¼äµÄxml
xml´úÂëexample: ÔÙ˵ǰÈýÖÖ·½·¨£¬Ò²ÊÇ´ÓÍøÉÏ¿´À´µÄ¡£http://www.cnblogs.com/patrickchen/articles/1188920.html
D: eport.css
µÚÒ»¸ö·½°¸.ÉèÖÃÄãµÄxpathµÄÃüÃû¿Õ¼äsetNamespaceURIs
1: public class TransferXML { 2: public static void main(String[] args) throws Exception{ 3: Map map = new HashMap(); 4: map.put("design","http://www.eclipse.org/birt/2005/design"); 5: SAXReader saxReader = new SAXReader(); 6: File file = new File("D:\test.xml"); 7: Document document = saxReader.read(file); 8: XPath x = document.createXPath("//design:list-property"); 9: x.setNamespaceURIs(map); 10: List nodelist = x.selectNodes(document); 11: System.out.println(nodelist.size()); 12: } 13: }
µÚ¶þ¸ö½â¾ö·½°¸:ÉèÖÃÄãµÄDocumentFactory()µÄÃüÃû¿Õ¼ä setXPathNamespaceURIs
1: public class TransferXML { 2: public static void main(String[] args) throws Exception{ 3: Map map = new HashMap(); 4: map.put("design","http://www.eclipse.org/birt/2005/design"); 5: SAXReader saxReader = new SAXReader(); 6: File file = new File("D:\test.xml"); 7: saxReader.getDocumentFactory().setXPathNamespaceURIs(map); 8: Document document = saxReader.read(file); 9: List tmp = document.selectNodes("//design:list-property"); 10: System.out.println(tmp.size()); 11: } 12: }
µÚÈýÖÖ·½·¨£º±¾ÈËÓõģ¬×ҲÊÇ×îͨÓõķ½·¨£¬¾ÍÊDz»Ê¹Óÿª·¢»·¾³¸øÄãÌṩµÄһϵÁжÔÏ󣬶øÊÇÓÃXPathÓï·¨ÖÐ×Ô´øµÄlocal-name() ºÍ namespace-uri() Ö¸¶¨ÄãҪʹÓõĽڵãÃûºÍÃüÃû¿Õ¼ä¡£
µ±ÄãÓöµ½Ê¹ÓÃxsltÀ´Ñùʽ»¯xmlʱ£¬¾ÍÖªµÀÕâ¸ö±¿·½·¨µÄºÃ´¦ÁË£º
1: public class TransferXML { 2: public static void main(String[] args) throws Exception 3: SAXReader saxReader = new SAXReader(); 4: File file = new File("D:\test.xml")


Ïà¹ØÎĵµ£º

DataSetÓëxmlÎļþµÄ»¥Ïàת»»


http://www.cnblogs.com/long2006sky/articles/1258731.html
DataSetת»»ÎªxmlÎļþ
//½«DataSetת»»ÎªxmlÎļþ
        private static void ConvertDataSetToXMLFile(DataSet xmlDS, string xmlFile)
        {
    &n ......

ÔõôÓÃXML´«ËÍͼÏñÊý¾Ý

DelphiÖÐÓÐÒ»¸öEncdDecdµ¥Ôª,uses   Ëü,ÒÔϵĺ¯Êý³ö×ÔÕâ¸öµ¥Ôª  
   
  1.ÓÃTBitmap¶ÔÏóLoadͼƬ  
    TBitmap.LoadfromFile  
  2.°ÑTBitmap´æÈëÒ»¸öStreamÖÐ    
TBitmap.SaveToStream(mapStream)  
  3.°ÑͼƬÁ÷½øÐÐbase64±àÂë,É ......

XML ʵÌåÒýÓÃ

ÔÚ XML ÖУ¬Ò»Ð©×Ö·ûÓµÓÐÌØÊâµÄÒâÒå¡£
Èç¹ûÄã°Ñ×Ö·û "<" ·ÅÔÚ XML ÔªËØÖУ¬»á·¢Éú´íÎó£¬ÕâÊÇÒòΪ½âÎöÆ÷»á°ÑËüµ±×÷ÐÂÔªËØµÄ¿ªÊ¼¡£
ÕâÑù»á²úÉú XML ´íÎó£º
<message>if salary < 1000 then</message>
ΪÁ˱ÜÃâÕâ¸ö´íÎó£¬ÓÃÒ»¸öʵÌåÒýÓÃÀ´´úÌæ "<" ×Ö·û£º
<message>if salary < 1000 then ......

DataSet¡¢Excel¡¢XMLÖ®¼äµÄµ¼Èëµ¼³ö

class ImportExportToExcel
{
public class ImportExportToExcel
{
private string strConn;
private System.Windows.Forms.OpenFileDialog openFileDlg = new System.Windows.Forms.OpenFileDialog();
private System.Windows.Forms.SaveFileDialog saveFi ......

xmlºÍjava BeanµÄÖ±½Óת»»£¬Xmap

package test;
import java.util.ArrayList;
import java.util.List;

import org.nuxeo.common.xmap.annotation.XNode;
import org.nuxeo.common.xmap.annotation.XNodeList;
import org.nuxeo.common.xmap.annotation.XObject;


/**
* Book ʵÌå¶ÔÏ󣬴˴¦ÓÃXMap×¢½â
* @author Administra ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ