I am working to on an application which generates XML based on user input.

Currently the application is in Design phase. And I am really confused on how to progress on this.

Well the Idea is that:

  • The Application will have UI module, developed using Angular.
  • REST Api module developed using Java JAX-RS. And
  • Will have a database of-course.

It should allow user to build and XML like below diagram.

enter image description here

The output XML will be accessed by another application.

The catch is: Each Activity that you see in the picture will have its own different set of properties.

How do I store this kind of Data in a Relational Database?
How does the data flow between UI and REST API layers?

Please give me some ideas or any case studies which already have this kind of requirements.

  • 2
    How does any of this relate to XML (other than your data is a tree?)
    – Caleth
    Commented Mar 21, 2018 at 12:56
  • 1
    Sorry i didn't understand your question. Commented Mar 21, 2018 at 13:09
  • 1
    Offhand, I don't see the need for any additional architecture here, other than ordinary OO and the patterns that Java-ee and Angular2 already provide. Commented Mar 21, 2018 at 16:28
  • 1
    If you're not storing relations, consider a non-relational database -- or the non-relational storage types for your DBMS. (JSON, XML, BLOB, etc.) How does the data flow? ... Not sure what your hangup is there. Until they need to be sent over the wire, they should either be domain objects or DTO's. As for actually sending them over the wire, that's not an un-Google-able problem.
    – svidgen
    Commented Mar 22, 2018 at 4:43
  • Sorry, I could not resist
    – Laiv
    Commented Mar 22, 2018 at 7:53

1 Answer 1


Allow me to react to this the way I would in a design meeting:

Architecture approach for developing a XML generator application

Why XML? Have you considered JSON?

REST Api module

Why REST? What problem does this solve?

Will have a database of-course.

Why? XML (and JSON) want to be a tree in a file.

How do I store this kind of Data in a Relational Database?

If you mean the XML, Relational Databases excel when the data has a fixed size, not when it's length is highly variable like XML. You'd have to store XML in a blob. Which isn't very useful. Why do this?

If you mean the data structure in your picture you'd need a self referencing table because an activity can connect to an activity.

How does the data flow between UI and REST API layers

Presumably the UI would be a REST client talking to a REST server.

Right now I have two solutions that generate XML from user input just fine: notepad and vim. What does this design do to improve on them?

Rather then let this be the start of a discussion please think about how you'd answer these challenges to your assumptions and come back to us with more focused questions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.