A force directed layout graph (http://en.wikipedia.org/wiki/Force-directed_graph_drawing) is is well suited for hierarchical structures or directed graph, perfect to visualize the relationships existent between the elements of a XML structure.
QXmlEdit 0.8.5 lets you view the content of the current data or another file of your choice creating a graphic scene of the current screen dimensions, inserts the graphical representation of the elements in random positions inside it. The nodes migrate into an equilibrium configuration automatically under the application of a force similar to the binding of the electric particles, to reach an optimal distribution in the general case. A damping factor is applied to avoid a long stabilization time of the configuration.
The panel can be reached with one of these methods depending on the data to show:
- The current file open in the editor
Edit a file and select the menu item “Relations” from the “View” menu.
- A file on the file system
Choose the “Relations…” item from the”Tools” menu and use the browse button to load a file or drop in a file.
- The map panel
From the Tools menu, choose the View Map item, before loading any file, check the the “Analyze relations” option; after loading the file, operate the “View Relations…” button.
When the panel is open it is possible to
- View the structure
The panel shows the relations between elements. Each circle represent an XML element. The lines show a relationship between element types. To evenly distribute the elements on the view area, each element is repelling the others, the nodes are connected by simulated springs.
- Move the items
The elements can be dragged with the mouse causing the movement of the other elements until reaching a new equilibrium point. Zoom controls can modify the view.
Each time the “Reset” button is pressed, a new initial casual combination is generated and the elements move themselves to reach a new equilibrium point.
- Isolate a single element
Checking the “Center Selected” option, hides all the elements that are not diretcly connected with the selected one. By clicking on one node, you can filter the display of nodes showing only the data related to the selected element.
The data can be shown also in tabluar format
Each element on the rows show its absolute and relative count and the references made to any other element.
The settings can be tuned.
The intensity of the replusive force can be changed using the “Force” slider. The effective distance that the force can act can be set using the “Radius” slider. The lenght of the lines connecting elements can be regulated using the “Spring” slider.