commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karthik prasad <jv_karthik...@yahoo.com>
Subject XML - Hashmap Conversion Using Betwixt
Date Fri, 08 Aug 2008 05:31:52 GMT
Hi,I need to convert the following xml to hashmap using betwixt, i have even given the bean.
Can anyone tell me how the .betwixt file should be?



code:
--------------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?> <clientInfo>		<client id="HJKN">
		<attributeName>high_val</attributeName>			<multivalue>true</multivalue>
		<delimiter>|$</delimiter>		</client>		<client id="VJGVJH">			<attributeName>summ_val1</attributeName>
		<attributeName>summ_val2</attributeName>			<attributeName>summ_val3</attributeName>
		<multivalue>true</multivalue>			<delimiter>$</delimiter>		</client>
</clientInfo>   import java.util.HashMap; /** *  * * To change the template for this
generated type comment go to * Window>Preferences>Java>Code Generation>Code and
Comments */public class DataClient {		    private String id;		private HashMap attributeNames;
	private boolean multivalue;		private String delimiter; 				 		/**		 * @return		 */		public
String getDelimiter() {			return delimiter;		} 		/**		 * @return		 */		public boolean isMultivalue()
{			return multivalue;		} 		 		/**		 * @param string		 */		public void setDelimiter(String
string) {		
	delimiter = string;		} 		/**		 * @param b		 */		public void setMultivalue(boolean b) {		
multivalue = b;		} 		/**		 * @return		 */		public String getId() {			return id;		} 		/**	
 * @param string		 */		public void setId(String string) {			id = string;		} 		 		/**		 * @return
	 */		public HashMap getAttributeNames() {			return attributeNames;		} 		/**		 * @param map
	 */		public void setAttributeNames(HashMap map) {			attributeNames = map;		} }



      Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message