Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tool for Generating Graph from Xml data [closed]

Tags:

java

xml

diagram

I want to generate graph from large xml files. It is actually a calling context tree generated by an execution of the program. A small file looks like below:

enter image description here

From this xml I would like to have a graph which Contains 4 nodes(one node for each method tag) i.e. main, methodA, methodB and method C. As the tree shows (from the indentation) main() calls methodA, then methodA calls methodB and methodC. So the I want a graph'/figure like something like below:

enter image description here

Are there any open source tools which can do this for me ? The xml files are extremely large (around 7 MB) so the graph would really be huge. I want the tool to handle this properly. It is good if the tool works on linux otherwise on windows will also be ok. But first preference is linux.

I can also consider some good library in java through which I can do this.

Thanks.

like image 672
user523956 Avatar asked Jul 12 '12 15:07

user523956


People also ask

How do I visualize an XML file?

You can view XML files in different ways including using a text editor, like Notepad or TextEdit, a web browser like Safari, Chrome, or Firefox, or an XML viewer. Open your text editor or XML viewer, then open your XML to view it. Drag and drop the XML file to your web browser to view it.

Is XML a graph?

An XML document is a tree, which is a particular sort of directed graph.

Can XML be used for transmitting data?

General applications: XML provides a standard method to access information, making it easier for applications and devices of all kinds to use, store, transmit, and display data.


1 Answers

My suggestion would be yEd - it is not open source, but free and cross-platform (Java-based and works amazingly smooth on Linux with Oracle's JDK) and uses open standards for input/output. It is capable of visually arranging networks with thousands of nodes and has an import tool that can read xml files. Since there is no single best way to import an xml file into a graph structure, you can associate an XSLT file and convert the input to GraphML - yEd can automatically apply the XSLT file to your xml file and then calculate a nice drawing that can then be analyzed or exported.

Here are links to some XSL example stylesheets that you can use as a basis.

like image 146
Sebastian Avatar answered Oct 14 '22 17:10

Sebastian