I'm working through a little proof of concept and have run into a small
issue. I have searched the archives the best I could and not found any
message that addresses this. My apologies if it has been asked before, if
so it just points out deficiencies in my search criteria skills.
I'm being supplied data that I cannot control (from a UI, for instance)
where any value could be coming to me for a given attribute including "&",
"<", and ">" - which from what I understand is not valid XML character
data according to the XML specification if I'm reading it properly.
I created a test data class to test my binding, and populated lastName
with a value containing these known characters that need replacement with
the appropriate escape character sequence. The other data in it is being
converted just fine - it is just here for an example.
firstName: Test First Name
dataDate: Wed Jan 05 20:01:31 EST 2011
Here's my binding file:
<mapping name="ROOT" class="com.james.TestDataClass">
<structure name="TEST_INFO" ordered="false" >
<value name="ID" style="attribute" field="attributeId"
<structure name="NAME" usage="optional">
<value name="FIRST_NAME" field="firstName"
<value name="LAST_NAME" field="lastName"
<value name="DATE" field="dataDate" usage="optional"/>
<value name="REQUEST_NUMBER" field="requestNumber"
What I expected was that the LAST_NAME tag would have the special
character's escaped - that the character value would be
'special&character<test>here'. However, that is not what I see
when I generated the XML. Instead, this is what I received:
<FIRST_NAME>Test First Name</FIRST_NAME>
Specifically, I expected the escaped value of '>' to have replaced the
'>' in my test string value. Is there something built into jibx that does
this conversion automatically - perhaps an option that I'm neglecting to
set in my binding file?
I know that I could write a custom serializer/deserializer for String, but
thought that perhaps I'm not the only one who has faced this issue.
Perhaps I'm missing the true issue - I welcome your feedback.
Thanks in advance,
This e-mail message is intended only for the use of the individual or entity to
which the transmission is addressed. Any interception may be a violation of
law. If you are not the intended recipient, any dissemination, distribution or
copying of this e-mail is strictly prohibited. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all copies of