XStream
  1. XStream
  2. XSTR-581

serialization of underscorre(_) characters does not happen correctly

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Blocker Blocker
    • Resolution: Not A Bug
    • Affects Version/s: 1.3.1
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None

      Description

      I have a difficulty in converting java object to XML.

      I would like to convert a Java object to XML somthing like this

      <S_Transaction_Set_Header>
      <E_Transaction_Set_Identifier_Code>856</E_Transaction_Set_Identifier_Code>
      <E_Transaction_Set_Control_Number>0001</E_Transaction_Set_Control_Number>
      </S_Transaction_Set_Header>

      I have Java object defined like this

      public class TransactionHeader
      {
      private String E_Transaction_Set_Identifier_Code;
      private String E_Transaction_Set_Control_Number;
      }

      I could able to do the transformation but there is one issue with serializing of the underscore character (_)
      The resultant XML is coming like thisi

      <S_TransactionSet_Header>
      <S_TransactionSetHeader>856</STransactionSet_Header>
      <E_TransactionSetControlNumber>0001</ETransactionSetControl_Number>
      </S_TransactionSet_Header>

      HOW DO i ENSURE THAT _ CHARACTER IS SERIALIZE CORRECTLY

      THANKS

        People

        • Assignee:
          Jörg Schaible
          Reporter:
          vispute
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: