I'm TOTALLY lost and stuck here, so any help is GREATLY appreciated! 🙂
Here are my simplified XML files:
<getResponse>
<chassis ident="0">
<ftmslot ident="0"><module state.admin="unlocked" state.operational="enabled" state.service="started"></module>
</ftmslot>
<ftmslot ident="1"><module state.admin="TEST" state.operational="enabled" state.service="started"></module>
</ftmslot>
<ftmslot ident="2"><module state.admin="unlocked" state.operational="test" state.service="started"></module>
</ftmslot>
</chassis>
</getResponse>
<getResponse>
<status>ok</status>
<chassis ident="0">
<ftmslot ident="0"><module><common moduleType="FTM" productCode="0100-50400" revisionNumber="17" serialNumber="00244" slotNumber="43"></common>
</module>
</ftmslot>
<ftmslot ident="1"><module><common moduleType="FTM" productCode="0100-50400" revisionNumber="17" serialNumber="00053" slotNumber="45"></common>
</module>
</ftmslot>
<ftmslot ident="2"><module><common moduleType="FTM" productCode="0100-50400" revisionNumber="17" serialNumber="00206" slotNumber="13"></common>
</module>
</ftmslot>
</chassis>
</getResponse>
<getResponse>
<status>ok</status>
<chassis ident="0"><aimslot><module><software version="6.0.0-1.0.0_rev_11225_2008_05_29at21_04_45_SANITY"></software>
</module>
</aimslot>
<amslot><module><software version="6.0.0-1.0.0_rev_11225_2008_05_29at21_04_45_SANITY"></software>
</module>
</amslot>
<ftmslot ident="0"><module><software version="6.0.0-1.0.0_rev_11225_2008_05_29at21_04_45_SANITY"></software>
</module>
</ftmslot>
<ftmslot ident="1"><module><software version="6.0.0-1.0.0_rev_11225_2008_05_29at21_04_45_SANITY"></software>
</module>
</ftmslot>
<ftmslot ident="2"> <module><software version="6.0.0-1.0.0_rev_11225_2008_05_29at21_04_45_SANITY"></software>
</module>
</ftmslot>
</chassis>
</getResponse>
<getResponse>
<status>ok</status>
<chassis ident="0"> <aimslot modulePresent="1" state.admin="unlocked" state.operational="enabled" state.service="started"> </aimslot>
<amslot modulePresent="1" state.admin="unlocked" state.operational="enabled" state.service="started"> </amslot>
<ftmslot ident="0" modulePresent="1" state.admin="unlocked" state.operational="enabled" state.service="started"> </ftmslot>
<ftmslot ident="1" modulePresent="1" state.admin="unlocked" state.operational="enabled" state.service="started"> </ftmslot>
<ftmslot ident="2" modulePresent="1" state.admin="unlocked" state.operational="enabled" state.service="started"> </ftmslot>
<ftmslot ident="3" modulePresent="1" state.admin="unlocked" state.operational="enabled" state.service="started"> </ftmslot>
</chassis>
</getResponse>
The actual XMl files are more complex, but I want to get the basics done first.
Basically I need to create a table as an output from these files. Each row has to display the 'ftm' slot attributes.
I've been trying arrays, but got lost in them! My boss says I need to create a matrix based on a multi-dimensional array. I need to create an array of all the arrays.
I can post my PHP code that I have so far, but since it's not working properly, I don't.
Could you help me please?
thanks
Kamy