From: Girish S. <sho...@gm...> - 2012-03-23 22:02:38
|
How do i convert an XML to a graph readable format using Java based on the parent child relationship as described in the below xml? (Represent xml as a family tree) Sample Input XML <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <family-tree appNo="600"> <Node-Definitions> <d id="1" type="APP" nodeId ="600" creationDate = "03-12-2012"/> <d id="2" type="APP" nodeId ="601" creationDate = "03-12-2011"/> <d id="3" type="APP" nodeId ="602" creationDate = "07-10-2011"/> <d id="4" type="APP" nodeId ="603" creationDate = "08-04-2011"/> <d id="5" type="APP" nodeId ="604" creationDate = "01-01-2010"/> </Node-Definitions> <relations> <r id="2" parent="1" child="2" /> <r id="4" parent="5" child="4" /> <r id="3" parent="1" child="2" /> <r id="3" parent="2" child="3" /> <r id="3" parent="5" child="3" /> </relations> </family-tree> Can you provide us with a sample example if possible.. |