how to get several element from configuration xml file
LeeHyung Joo - Kevin <[email protected]> Mon, 13 Feb 2012 13:44:46 +0900
| Newsgroups | gmane.comp.java.springframework.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all.
I'm using XStream.
I have a problem to get value in xml configuration file.
My xml file is below:
<a>
<b id="1">
<c type="abc">
<c-1>test</c-1>
<c-2>sample</c-2>
</c>
</b>
<b id="2">
<c type="123">
<c-1>test</c-1>
<c-2>sample</c-2>
</c>
</b>
</a>
My beans are :
<bean id="XMLConverter" class="presence.test.XMLConverter">
<property name="marshaller" ref="xstreamMarshaller" />
<property name="unmarshaller" ref="xstreamMarshaller" />
</bean>
<bean id="xstreamMarshaller" class="org.springframework.oxm.xstream.XStreamMarshaller">
<property name="aliases">
<map>
<entry key="a" value="org.procarrie.A" />
</map>
</property>
<property name="useAttributeFor">
<map>
<entry key="id">
<value type="java.lang.Class">java.lang.String</value>
</entry>
<entry key="type">
<value type="java.lang.Class">java.lang.String</value>
</entry>
</map>
</property>
</bean>
package org.procarrie;
public class A {
B b = null;
public void setB(B b) {
this.b = b;
}
public B getB() {
return b;
}
public String toString() {
return b.toString();
}
}
how can read configuration value more than one?
Thanks in advanced
Best Regards
Kevin Lee.
------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Springframework-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/springframework-developer