Hi keith,
thanks for your answer, in combination with try & error i solved the
problem.
for all others searching for a solution (and google told me there are
someones ;-)), here's the code working for me:
----JAVA----
private AnyNode content;
private Object attribute;
public AnyNode getContent() {
return content;
}
public void setContent(AnyNode content) {
this.content = content;
}
----XML----
<content attribute="...">
<!--
it's important to put an extra element around the mixed content
without attributed
-->
<text>bla <b>blub</b> bla</text>
</content>
----MAPPING----
<class name="TextContent">
<map-to xml="content"/>
<field name="attributeName" type="...">
<bind-xml name="attribute" node="attribute"/>
</field>
<field name="content" type="org.exolab.castor.types.AnyNode">
<bind-xml name="text"/>
</field>
</class>
best regards
martin
Keith Visco schrieb:
Hi Martin,
Castor is a bit weak when it comes to handling Mixed content. If you can
use org.exolab.castor.types.AnyNode that's probably your best bet.
--Keith
Martin Resch wrote:
hi,
can anybody help me to unmarshall mixed content? it may be like
following:
<text>simple text</text>
or
<text>simple <b>bold</b> text</text>
or
<text><b>bold</b> text</text>
or
...
which form has the mapping and the object type (maybe AnyNode or
Element) to be?
Any ideas for a solution? thanks!!
best regards
martin
------------------------------------------------------------------------
-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty
message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------
-------------------------------------------------
If you wish to unsubscribe from this list, please send an empty message
to the following address:
[EMAIL PROTECTED]
-------------------------------------------------
-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:
[EMAIL PROTECTED]
-------------------------------------------------