Book a Demo

Author Topic: Visualize XML document in diagram  (Read 7723 times)

Kristofer

  • EA User
  • **
  • Posts: 52
  • Karma: +0/-0
    • View Profile
Visualize XML document in diagram
« on: September 01, 2016, 06:17:27 pm »
Hi!

We are trying to visualize an XML document (not the schema) using a class diagram. The target audience for this diagram is not experienced in UML, and certainly not inheritance, hence we need to keep the diagram as simple as possible. The schema however is complex and contains a lot of inheritance, and we are starting to realize that we are creating the same attribute over and over again, as well as duplicating elements (to avoid connectors crossing each other). This will obviously be a maintance nigthmare.

I was looking at the "virtualize connector" to atleast get rid of multiple elements, but it seems that the "virtualized class" does not show the attributes, only the name.

I was also thinking about using inheritance, but hide it and use the "Show inherited attributes" feature. The problem with this is that in the attribute list, it shows the name of the inherited class (which I will have a hard time to convince why it needs to be there), and we also need to have the attributes in a certain order (specified in the XML schema).

Does anyone have a suggestion of how we would accomplish what we want, yet still keep it easy to maintain?

/Kristofer

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Visualize XML document in diagram
« Reply #1 on: September 02, 2016, 02:49:33 am »
Kristofer,

An XML document is conceptually the same thing as an object diagram, with instances, not classes.

Try to make an object diagram and use set runstate to set the values of the attributes.

Geert

Kristofer

  • EA User
  • **
  • Posts: 52
  • Karma: +0/-0
    • View Profile
Re: Visualize XML document in diagram
« Reply #2 on: September 03, 2016, 05:11:13 pm »
Thanks!

You are correct about the object diagram, and that made me realize that I am probably asking for something strange, and what I am trying to create is a mix between a class diagram and an object diagram. Perhaps I need several diagrams showing different views.

My biggest challenge is the fact that the diagram(s) needs to be useful for people with limited knowledge of UML.

However, you gave me an idea to create three diagrams with three different views, that I will try on Monday; One simplified class diagram for people who only need to know what kind of information there is (without really caring of the structure of the XML document), one class diagram as a true model (will solve the maintenance issue), and one object diagram showing an example.

I will probably be back soon with more questions.  :-)

/Kristofer

Kristofer

  • EA User
  • **
  • Posts: 52
  • Karma: +0/-0
    • View Profile
Re: Visualize XML document in diagram
« Reply #3 on: September 05, 2016, 04:58:33 pm »
A few questions that arised (unfortunately i cannot attach any images here so I hope I can explain), all related to the order of attributes (elements in the XML schema)

In a class diagram, if you have enabled "Show additional parents", you can see the inherited class name in the upper right corner. This shows the immediate parents, but not the parent's parent. Can this be changed?

And/or, can you specify the order in this list if the class have multiple parents (seems to be alphabetically)?

Or, if you instead enable "Show attributes" for inherited features (in the Feature and Compartment Visibility window), can you specify the order?

For the object diagram, there does not seem to be any option at all to specify the order. Is there some hidden feature somewhere that I cannot find?

/Kristofer