Parsing xml with a tag that contains more than one information

tescentisreri

New Member
I have an xml like this\[code\]<catalogo><items><item><ID>1</ID><NAME>VA</NAME><SIZE>S</SIZE><GROUP>1,2,3,4</GROUP></item><item><ID>2</ID><NAME>VA</NAME><SIZE>M</SIZE><GROUP>l,2,3,4</GROUP></item><item><ID>3</ID><NAME>VA</NAME><SIZE>L</SIZE><GROUP>1,2,3,4</GROUP></item><item><ID>2</ID><NAME>VA</NAME><SIZE>XL</SIZE><GROUP>l,2,3,4</GROUP></item></items></catalogo>\[/code\]The TAG GROUP it refers to all id of the products that are the same but differs in the value of the TAG SIZE.I'd like to obtain a sql table like this\[code\] id name size1 size2 size3 size4 1 va s m l xl\[/code\]How can I parse this xml with php to obtain my desired table?
 
Top