I have xml file which is very big around 1MB. Below is the part of it.
myXml.xml
<machinemodel:Machine xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:machinemodel="http://xsd.tns.com/corona/models/installation/machinemodel">
<installations description="private installation area" installHome="file:/C:/scripts/host/" pluginsDirectory="file:/C:/scripts/plugins/">
<releaseUnits version="6.0.100.001" componentID="com.apache.jasper.feature" name="Third-party Library org.apache.jasper feature" description="Third-party Library org.apache.jasper feature">
<dependencies componentID="com.javax.system.exports.feature" rangeLow="5.0.0" rangeHigh="6.0.0" lowInclusive="true"/>
<dependencies componentID="com.javax.servlet.feature" rangeLow="2.5.100" rangeHigh="3.0.0" lowInclusive="true"/>
<dependencies componentID="com.javax.servlet.jsp.feature" rangeLow="2.1.100" rangeHigh="3.0.0" lowInclusive="true"/>
<memberBundles version="6.0.100.001" componentID="com.org.apache.jasper" location="file:/C:/scripts/host/plugins/com.org.apache.jasper_6.0.100.001/" unpack="true"/>
</releaseUnits>
<releaseUnits version="1.1.2.001" componentID="com.javax.servlet.jsp.jstl.feature" name="Third-party Library javax.servlet.jsp.jstl feature" description="Third-party Library javax.servlet.jsp.jstl feature">
<dependencies componentID="com.javax.servlet.feature" rangeLow="2.5.100" rangeHigh="3.0.0" lowInclusive="true"/>
<dependencies componentID="com.javax.system.exports.feature" rangeLow="5.0.0" rangeHigh="6.0.0" lowInclusive="true"/>
<dependencies componentID="com.javax.servlet.jsp.feature" rangeLow="2.1.100" rangeHigh="3.0.0" lowInclusive="true"/>
<memberBundles version="1.1.2.001" componentID="com.javax.servlet.jsp.jstl" location="file:/C:/scripts/host/plugins/com.javax.servlet.jsp.jstl_1.1.2.001/" unpack="true"/>
</releaseUnits>
</installations>
</machinemodel:Machine>
Now I need to take some data from xml and show it into tree format. Here machinemodel will be root and dependencies componentID and memberBundles will be leaf of each releaseUnits.
I am using XSLT to collect the related data and transforming into another xml which will further convert into json file and using D3.js through which I can make collapsible tree as shown in this link http://bl.ocks.org/mbostock/4339083
Any other idea???
0 comments:
Post a Comment