XStream
  1. XStream
  2. XSTR-181

How to serilaize nested classes

    Details

    • Type: Task Task
    • Status: Closed Closed
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • JDK version and platform:
      Sun j2sdk1.4.1_01 for Windows

      Description

      Need to create xml like from a java class.
      <Top level class>
      <member1>1</memeber1> //members of top level class
      <member2>2</memeber2>//
      <Sub class>--------------------------//
      <member1>1</memeber1> // members of sub class
      <member2>2</memeber2>
      </Sub class>
      </Top level class>

      Can this type of xml be generated from a java object using XSTREAM ?

      If this can be done then plz let me know the best way of doing it and HOW SHOULD i DECLARE MY JAVA CLASS.

      public class TopLevelClass

      { private String member1; private String member2; private SubClass subClass; }

      public class SubClass{
      private String member1;
      private String member2;
      }

      Thx

        People

        • Assignee:
          Unassigned
          Reporter:
          imthbest
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: