我想在spring項目中解析xml文件。任何人都可以爲此提供方向嗎?在Spring項目中讀取和解析xml文件
此xml文件將用於加載需要驗證每個jsf頁面的各種字段。
我想使用該XML要通過文檔生成工廠或任何通用函數存在於彈簧
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(fXmlFile);
我想驗證頁,其在此xml定義的特定值讀取。所以我需要解析這個XML文件,因爲我們在簡單的Java程序中使用DocumentBuilderFactory
你想解析一個通用的XML文件,還是希望Spring讀取你的XML配置文件並實例化你的bean? – MarcoS 2011-05-17 09:08:14
你想解析任何.xml文件,或者你想解析spring配置xml文件? – Bozho 2011-05-17 09:08:46
還是Java properties.xml文件? – 2011-05-17 09:10:07