XML Manipulation Service 를 적용해서 DOM(Document Object Model) 으로 XML문서로 되어 있는 사용자 등록 정보를 읽어 Element 를 변경한다.
<bean id="domconcreteCont" class="egovframework.rte.fdl.xml.EgovConcreteDOMFactory"/>
<context:property-placeholder location="classpath*:spring/egovxml.properties" /> <bean id="xmlconfig" class="egovframework.rte.fdl.xml.XmlConfig"> <property name="xmlpath" value="${egovxmlsaved.path}" /> </bean>
egovxmlsaved.path=C:\\Temp\\
/** XML Manipulation */ @Resource(name = "domconcreteCont") EgovConcreteDOMFactory domconcrete; List<SharedObject> sobject = new ArrayList<SharedObject>(); SAXBuilder builder = new SAXBuilder(); Document doc = builder.build(new File(propertiesService.getString("marshallingDir") + "cvplUserMarshalling.xml")); domconcrete.CreateDOMValidator().updElement(doc, "user-name", "userName", null);