-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancementA general enhancement
Milestone
Description
Nil opened SPR-11702 and commented
There is no way from XStreamMarshaller to inject the custom NameCoder in the call to create StaxReader.
Details:
XStream uses '' as the escape character. For the XML files with " _ " as names it's unable to parse fields as XStream converts the "x_x" names into "x _x".
The work around for XStream is use custom NameCoder.
XStreamMarshaller wraps the call to create a StaxReader as follows:
@Override
protected Object unmarshalXmlStreamReader(XMLStreamReader streamReader) throws XmlMappingException {
return doUnmarshal(new StaxReader(new QNameMap(), streamReader), null);
}
This causes the default StaxReader to get created with XMLFriendlyNameCoder.
public StaxReader(QNameMap qnameMap, XMLStreamReader in) {
this(qnameMap, in, new XmlFriendlyNameCoder());
}
Affects: 4.0.3
Metadata
Metadata
Assignees
Labels
in: dataIssues in data modules (jdbc, orm, oxm, tx)Issues in data modules (jdbc, orm, oxm, tx)type: enhancementA general enhancementA general enhancement