[xmlbeans]自動生成讀寫xml的java類

qking93415981發表於2020-04-06

在網上看到了使用xmlBeans開源工具生成讀寫xml的java類,覺得這是一個很好的工具,比如說系統中的配置檔案的生成和讀寫!

功能:根據xsd檔案自動生成xml訪問的類,包括型別對應的Bean
用法:定義.xsd檔案和.xsdconfig檔案放於schemas下面,執行run.bat即可。
xml讀取方法:
 File xmlFile = new File(filename);
 //ConfigDocument doc = ConfigDocument.Factory.parse(xmlFile);
 //ConfigType config = doc.getConfig();
 
========================================================

現將eclipse中整個專案上傳,需要上apache.org上下載xmlBeans的Lib檔案
????怎麼新增檔案????

 

 

相關文章