XML validation (different child tags) based on attribute value
问题 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