Jump to content

XML Serialization. SimpleXML. Problem with dynamic serialization.

- - - - -

  • Please log in to reply
No replies to this topic

#1
lexikovs

lexikovs

    Newbie

  • Members
  • Pip
  • 1 posts
While generating XML files with SimpleXml, I got challengefull problem.

I want to make dynamic xml output in the following way.

<process>

<sequence> ... </sequence>

<flow> ... </flow>

<sequence> ... </sequence>

<flow> ... </flow>

</process>
The question is How can I defined in the Schema using SimpleXMl?

Now, it looks in this way

@Root

public class Process {



    @ElementList(inline=true, required = false)

    private List<Sequences> sequence;


    @ElementList(inline=true, required = false)

    private List<Flows> flow;

    }
According this schema it always generates XML in following format:

<process>

<sequence> ... </sequence>

<sequence> ... </sequence>

<flow> ... </flow>

<flow> ... </flow>

</process>
What should I do? Thank you.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users