j'ai ce script :
$xml=simplexml_load_string($Result->Components);
var_dump($Result->Components)
; ce qui m'affiche :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90
| object(stdClass)[105]
public 'Component' =>
array (size=3)
0 =>
object(stdClass)[104]
public 'Title' => string 'dessus dessous' (length=14)
public 'NbSections' => int 2
public 'NbPages' => int 2
public 'NumElem' => int 1
public 'ElemType' => string 'ENCARTE' (length=7)
public 'ElemSubType' => string 'ENC' (length=3)
public 'FmtStd' =>
object(stdClass)[106]
...
public 'Paper' =>
object(stdClass)[107]
...
public 'Ink' =>
object(stdClass)[108]
...
public 'Finishing' =>
object(stdClass)[109]
...
public 'Misc' =>
object(stdClass)[110]
...
public 'Varnish' =>
object(stdClass)[111]
...
public 'TechnicalData' =>
object(stdClass)[112]
...
1 =>
object(stdClass)[113]
public 'Title' => string 'Intérieur 33 feuillets' (length=23)
public 'NbSections' => int 33
public 'NbPages' => int 2
public 'NumElem' => int 2
public 'ElemType' => string 'ENCARTE' (length=7)
public 'ElemSubType' => string 'ENC' (length=3)
public 'FmtStd' =>
object(stdClass)[114]
...
public 'Paper' =>
object(stdClass)[115]
...
public 'Ink' =>
object(stdClass)[116]
...
public 'Finishing' =>
object(stdClass)[117]
...
public 'Misc' =>
object(stdClass)[118]
...
public 'Varnish' =>
object(stdClass)[119]
...
public 'TechnicalData' =>
object(stdClass)[120]
...
2 =>
object(stdClass)[121]
public 'Title' => string 'Assemblage' (length=10)
public 'NbSections' => int 35
public 'NbPages' => int 0
public 'NumElem' => int 3
public 'ElemType' => string 'ASS' (length=3)
public 'ElemSubType' => string 'ASS' (length=3)
public 'FmtStd' =>
object(stdClass)[122]
...
public 'Paper' =>
object(stdClass)[123]
...
public 'Ink' =>
object(stdClass)[124]
...
public 'Finishing' =>
object(stdClass)[125]
...
public 'Misc' =>
object(stdClass)[126]
...
public 'Varnish' =>
object(stdClass)[127]
...
public 'TechnicalData' =>
object(stdClass)[128]
... |
au dessous de TechnicalData j'ai d'autre balises que j'ai besoin de parser pour avoir les informations ,comment je peux faire ça avec simplexml
j'ai fait avec SOAP UI :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
| <Component>
<Title>Feuillet CFB</Title>
<NbSections>1</NbSections>
<NbPages>2</NbPages>
<NumElem>3</NumElem>
<ElemType>FEU</ElemType>
<ElemSubType>FEU</ElemSubType>
<FmtStd>
<Width>21</Width>
<Height>31</Height>
</FmtStd>
<Paper>
<Origin>IN_CATALOG</Origin>
<Family>CFB</Family>
<Type>EUR</Type>
<Color>RO</Color>
<Weight>60</Weight>
<Height>45</Height>
<Width>32</Width>
</Paper>
<Ink>
<FrontColors>1</FrontColors>
<FrontColorDesc>NOIR</FrontColorDesc>
<BackColors>1</BackColors>
<BackColorDesc>NOIR</BackColorDesc>
<Coverage>20</Coverage>
<FrontProcess>0</FrontProcess>
<BackProcess>0</BackProcess>
<IdentColors>1</IdentColors>
<FrontPlates>1</FrontPlates>
<FrontPlateChg>0</FrontPlateChg>
<BackPlates>0</BackPlates>
<BackPlateChg>0</BackPlateChg>
</Ink>
<Finishing>
<Diecut>0</Diecut>
<Desensib>0</Desensib>
<Numbering>1</Numbering>
<Perfo>1</Perfo>
</Finishing>
<Misc>
<Auto>true</Auto>
<TrimBleed>0</TrimBleed>
<DoubleCut>0</DoubleCut>
<BindingLip>0</BindingLip>
</Misc>
<Varnish>
<Type>NO_VARNISHING</Type>
<Faces>0</Faces>
<Reserve>0</Reserve>
</Varnish>
<TechnicalData>
<GROUPS xmlns="">
<GROUP seq="192"/>
<GROUP seq="159"/>
<GROUP seq="386"/>
<GROUP seq="10087">
<FIN seq="7893">
<TEXT PERSO="1">Perfo de souche de 1.3 cm{/CR}</TEXT>
<REM PERSO="1">Perfo de souche de 1.3 cm{/CR}</REM> |
j'ai besoin de récupere la valeur de la balise REM
Merci en avance
Partager