Considering that XML::Simple is the only module which can be used, I am stuck in retrieving the values from an XML. The structure goes below:
<testxml>
<dev>
<A>
<tables>
<datatables>
<table>a1</table>
<table>a2</table>
<table>a3</table>
</datatables>
<propertytables>
<table>A1</table>
<table>A2</table>
</propertytables>
</tables>
</A>
<B>
<tables>
<datatables>
<table>b1</table>
<table>b2</table>
</datatables>
<propertytables>
<table>B1</table>
<table>B2</table>
</propertytables>
</tables>
</B>
</dev>
</testxml>
The XMLOut is :
<opt>
<dev name="A">
<tables name="datatables">
<table>a1</table>
<table>a2</table>
<table>a3</table>
</tables>
<tables name="propertytables">
<table>A1</table>
<table>A2</table>
</tables>
</dev>
<dev name="B">
<tables name="datatables">
<table>b1</table>
<table>b2</table>
</tables>
<tables name="propertytables">
<table>B1</table>
<table>B2</table>
</tables>
</dev>
</opt>
How do I retrieve the table array say for this condition:
dev name = "B" and tables name = "propertytables" # to output B1, B2