Hi,

there's absolitely no need to modify any code to get namespace support.
All that needs to be done is to amend your mapping file to include
information about namespace URIs (and optionally namespace prefices,
should you wish so).

Regards
Werner

joshua1970 wrote:
> Hi Werner,
> thanks for your reply. So I'll be looking for some information about
> namespaces,
> just one thing: do I need to modify also the Unmarshalling code to use
> namespaces
> or it's just necessary to add namespaces to the XML ?
> thanks a lot
> John
> 
> 
> Werner Guttmann wrote:
>> Hi John,
>>
>> Unless you start using namespaces, I am afraid the answer is no.
>>
>> Werner
>>
> 
> joshua1970 wrote:
>> Hi all !
>> I have to unmarshal the following XML:
>>
>> <sql-result> 
>>   <username name="thomas" id="754" />
>>   <username name="fred"  id="755" />
>> </sql-result>
>>
>> Unfortunately Castor issues the following error:
>> org.exolab.castor.xml.MarshalException: element "username" occurs more
>> than
>> once. (parent class: it.netcentrex.SqlResult)
>>
>> Here's how I have mapped the classes: the class UserName extends the class
>> SqlResult:
>>
>> <class name="it.netcentrex.SqlResult">
>>              <field name="username"
>>                      type="it.netcentrex.Username">
>>                      <bind-xml name="username" />
>>              </field>
>> ...
>> </class>
>>
>> <class name="it.netcentrex.Username"
>>              extends="it.netcentrex.SqlResult">
>>              <map-to xml="username" />
>>
>> <field name="id" type="java.lang.String">
>>      <bind-xml name="id" node="attribute" />
>> </field>
>> <field name="name" type="java.lang.String">
>>      <bind-xml name="name" node="attribute" />
>> </field>
>> </class>
>>
>> Is it possible to have multiple elements of username mapped by Castor ?
>> how
>> can I do it 
>> thanks a lot
>> John
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to