Hi
all,
I want to marhsall
and unmarshall an Object which has one of its attributes
returning an XML
String. So here is the Java Object
public class
foo{
String bar;
public foo(){}
public void setBar(String
barXML){
bar =
barXML;
}
public void getBar(){
return
bar;
}
}
and I am doing
:-
foo = new
foo();
foo.setBar("<xml-string><content>My
Content</content></xml-string>");
Mapping file
:-
<class
name="foo">
<field name="bar"
type="string"
<bind-xml name="bar" node="attribute"/>
</field>
</class>
<field name="bar"
type="string"
<bind-xml name="bar" node="attribute"/>
</field>
</class>
My questions are
:-
1) I know that
"<" , ">" etc. are special XML characters. Will Castor marshalling
replace
such special characters in my bar String with Character entities like
< and > etc. or I have to do it in my code.
2) Same
question on the unmarshalling side. Will Castor replace Character entitites into
resulting symbols?
I am using Castor
0.9.3.1.
Thanks in
advance.
Narinder
