I need to manipulate a xml file on my page. The XML contains 1 to n elements of the type field. Each field contains a dbname. With this information i need to create a new display tag and for each 1 to n field elements need to be added there
This is my source xml
<form>
<version>DE_TEST_1</version>
<description>METAXA V3.7.5-0 generated Meta Data XML for Form</description>
<author>METAXA</author>
<date>2014-09-02T15:59:31.428+02:00</date>
<pages height="297.0000885009766" width="210.00014478895395">
<page fillWithPattern="true" order="1">
<clips>
<clip display="SHOW" height="148.5" id="obere Hälfte" width="210.0" xPos="0.0" yPos="0.0"/>
<clip display="SHOW" height="148.5" id="untere Hälfte" width="210.0" xPos="0.0" yPos="148.5"/>
<clip display="SHOW" height="297.0" id="komplett" width="210.0" xPos="0.0" yPos="0.0"/>
</clips>
</page>
</pages>
</form>
<fields>
<field dbName="txt_StartRZ1_6" exportname="txt_StartRZ1_6" id="txt_StartRZ1_6" order="344" originX="0.0" originY="0.0" page="1" type="text" withprefill="false">
<fixedvalue/>
<storage type="string"/>
<hwr country="DE" dataformat="DIGIT" language="de" strokemapping="center_of_gravitiy"/>
<layout ismultiarea="true">
<font alignment="LEFT" color="#000000" name="Arial" size="10.0" style="NORMAL"/>
<area height="6.462202453613281" id="0" width="4.8778568691677515" xPos="42.004897308349605" yPos="109.39709082709422"/>
<area height="0.8382132636176215" id="2" width="0.5831416236029731" xPos="41.31027723948161" yPos="109.43731231689455"/>
<area height="6.462202453613281" id="1" width="4.8778568691677515" xPos="47.003407880995006" yPos="109.39709082709422"/>
<area height="6.4621809217664925" id="4" width="4.8778568691677515" xPos="56.999718475341794" yPos="109.35689086914064"/>
<area height="6.462202453613281" id="3" width="4.8778568691677515" xPos="52.0015631781684" yPos="109.39709082709422"/>
</layout>
</field>
</fields>
The new additionl display tag should be generated like the example at the bottom.
<display>
<labels>
<fieldlabels>
<label labelid="txt_StartRZ1_6">
<text>txt_StartRZ1_6</text>
<text locale="en">txt_StartRZ1_6</text>
</label>
</fieldlabels>
<grouplabels>
</grouplabels>
<rangelabels>
</rangelabels>
<strings/>
</labels>
<styles>
<style selector="txt_StartRZ1_5"/>
<style selector="txt_StartRZ1_6"/>
</styles>
<channels>
<channel name="tablet">
<viewdef name="landscape">
<section descriptionId="section__id_description" id="section__id" labelStyle="section__id_label_style" shortTitleId="section__id_short_title" style="section__id_style" titleId="section__id_title">
<panel descriptionId="panel__id_description" id="panel__id" style="panel__id_style" titleId="panel__id_title">
<item id="txt_StartRZ1_6_item_id" ref="txt_StartRZ1_6">
<widget id="txt_StartRZ1_6_widget_id" widget="TEXTFIELD"/>
</item>
</panel>
</section>
</viewdef>
</channel>
</channels>
</display>
Is there javascript/jquery library which I can use for this?
Thanks for the adivce