I am writing an dashboard designer that will create widgets based on xml values.
like
<dashboard>
<widget type="chart">
</widget>
</dashboard>
I want to change the tags inside the <widget> based on the value of @type for example if type="chart" Then it should allow different tags
<dashboard>
<widget type="chart">
<title text="Chart Title"></title>
<plotOptions>
<plotOptions>
<pie showInLegend="true" shadow="false" innerSize="50%">
<dataLabels color="#fff" distance="-20" format="{point.percentage:.0f} %" overflow="false"></dataLabels>
</pie>
</plotOptions>
<legend width="150" align="right" x="10" layout="vertical">
<navigation></navigation>
</legend>
<tooltip enabled="false"></tooltip>
<exporting enabled="true"></exporting>
</plotOptions>
</widget>
</dashboard>
AND if we have type="table" It should allow different tags
<dashboard>
<widget type="table">
<title text="Table Title"></title>
<thead>
<tr>
<th>One</th>
<th>Two</th>
<th>Three</th>
</tr>
</thead>
<tbody>
<tr>
<td>DS.One</td>
<td>DS.Two</td>
<td>DS.Three</td>
</tr>
</tbody>
</widget>
</dashboard>
And it should also give auto suggest in XML editor like "ECLIPSE"
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…