commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robert burrell donkin <>
Subject Re: Apache betwixt
Date Mon, 10 Oct 2005 00:18:50 GMT
On Thu, 2005-10-06 at 15:44 -0700, vladimir lenin wrote:
> Hello,

hi vladimir

> I am trying to use Betwixt to parse an XML document
> with elements from more than one namespace. But I am
> running into problems. Does Betwixt support
> namespaces? 


at the moment, there are no strategies so you'll need to create dot
betwixt files. (though the strategies would be easy to do.)

> if so, can someone please provide me a
> simple example that reads an XML with namespaces and
> converts it into a javabean

you just need to add uri attributes to the appropriate parts of the dot
betwixt file.

- robert

public class SimpleBean {
    private String alpha;
    private int beta;
    public String getAlpha() {
        return alpha;
    public void setAlpha(String alpha) {
        this.alpha = alpha;
    public int getBeta() {
        return beta;
    public void setBeta(int beta) {
        this.beta = beta;

<?xml version='1.0' encoding='UTF-8' ?>

	<element name="simple"
		<element name='alpha'
property='alpha' />
		<element name='beta'
property='beta' />

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

View raw message