Robert,thanks for the reply.
After I sent the email, I did some further
experimenting and set the
setNamespaceAware(true/false) method of the beanReader
to true. I was able to read fine without the need for
a .betwixt file

--- robert burrell donkin
<[EMAIL PROTECTED]> wrote:

> 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? 
> 
> yes
> 
> 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' ?>
> 
> <info>
>       <element name="simple"
>
uri='http://jakarta.apache.org/commons/betwixt/example'>
>               <element name='alpha'
>
uri='http://jakarta.apache.org/commons/betwixt/example'
> property='alpha' />
>               <element name='beta'
>
uri='http://jakarta.apache.org/commons/betwixt/example'
> property='beta' />
>       </element>
> </info>
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



        
                
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to