Chritophe,
it looks like you are getting slighly confused how to define namespace
and namespace prefices in a Castor mapping file.
Please have a look at
http://castor.org/xml-mapping.html#3.3-The-%3Cmap-to%3E-element
and
http://castor.org/xml-mapping.html#3.5-The-%3Cbind-xml%3E-element
and the <map-to/> and <bind-xml/> elements in particular to get an idea
about how to do this.
Werner
Delory Christophe wrote:
Hello all
I wish to unmarshall a MediaRSS XML document
(http://search.yahoo.com/mrss).
In such a document, an "item" element may accept two child elements: the
regular "description" element issued from the RSS specification, and the
"media:description" element coming from the MediaRSS extension. The same
case applies to the "title" element, by the way.
I can't unmarshal correctly such a document: in my example, the
"setMediaDescription" is always called for both elements, while the
"setRssDescription" (which occurs later in the mapping file) is never
invoked.
I insert here the related fragment of the mapping file:
<field name="mediaDescription" type="string"
get-method="getMediaDescription" set-method="setMediaDescription">
<bind-xml xmlns:media="http://search.yahoo.com/mrss/"
name="media:description" node="element" />
</field>
<field name="rssDescription" type="string"
get-method="getRssDescription" set-method="setRssDescription">
<bind-xml name="description" node="element" />
</field>
Does anyone have an idea?
I already crawled through the FAQ, mailing lists & documentation,
without success.
Thanks a lot.
Christophe Delory
---------------------------------------------------------------------
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