dom4j生成xmlns屬性的方法

最近使用dom4j生成xml文件發現了一個問題,在給元素添加 xmlns屬性時,不會在文件中輸出來,後來到網上查找,發現了原來在建立元素對象的時候傳參就能夠解決問題了。spring e.g 要顯示的效果:dom <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/X
相關文章
相關標籤/搜索