Details
-
Type: Improvement
-
Status: Closed
-
Priority: Minor
-
Resolution: Won't Fix
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
Description
It would be nice if there existed a setting to strip common field name prefices (such as: , f, f, m, m_ etc) from the outputted XML element names. This would make the XML produced even more human readable. Offcourse the unmarshalling process would have to check if there exists a Java field with a field name that matches with any of the prefices.
Example:
Java:
public class Person
XML (now):
<_person>
<_firstName>...</_firstName>
<_lastName>...</_lastName>
<_email>...</_email>
</_person>
XML (with this suggestion):
<person>
<firstName>...</firstName>
<lastName>...</lastName>
<email>...</email>
</person>
Further to this, our coding policy mandates that member variables are prefixed with m_.
When I stream these classes to xml the m_ gets augmented with another underscore. E.G. a member variable m_locationId gets output as:
<m_locationId>00000403</m_locationId>
Again it would be noce to be able to switch the m_ off for streaming.