commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Nedelcoux <>
Subject Betwixt question
Date Tue, 27 Sep 2005 11:41:56 GMT
I'm trying to use betwixt in order to load some XML files into Java beans.
The structure I'm trying to load is the following:
		<entry>some data</entry>
		<entry>some data 2</entry>
		<entry>some data 3</entry>
		<entry>some data 4</entry>

I am using the following betwixt mapping (inspired by the tutorial):

<?xml version="1.0" encoding="UTF-8" ?>
    <element name='root'>
	    <element name='line' property='lines' class='Line'>
        	<element name='entry' property='entries'/>

The Java classes are the following:

public class Root {

	private List lines = new ArrayList();
	public List getLines() {
      	return lines;
    	public void addLine(Line line) {

public class Line {
	private List entries = new ArrayList();
	public List getEntries() {
        	return entries;
	public void addEntry(String entry) {

I feel my case is quite basic but I can't make it work: it never reaches the
"entry" level in the xml file.
Am I using betwixt in a wrong way? Is there any specificity that makes
betwixt unusable in my case?

Thanks for your help.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message