Parsing and processing combined xml data, the solution must be appreciated

<?xml version="1.0" encoding="UTF-8"?>
<rss *>
  <channel>
    *
    <item>
      <title></title>
      <file>&name=&bz=*</file>
      *
      <size></size>
      *
      <category></category>
      *
    </item>
    <item>
    
    </item>
  </channel>
</rss>

the number of item is uncertain
according to the category
in item
one of the following three situations may occur

    <item>
      <title>10.abc</title>
      <file>http://a.com/10.file&name=10&bz=*</file>
      *
      <size></size>
      *
      <category>01</category>
      *
    </item>
     <item>
      <title>2.abc</title>
      <file>http://a.com/2.file&name=2&bz=*</file>
      *
      <size></size>
      *
      <category>01</category>
      *
    </item>
    <item>
      <title>1</title>
      <file>http://a.com/1.file&name=1&bz=*</file>
      *
      <size></size>
      *
      <category>01</category>
      *
    </item>
    
//category=01abc$fenlei1=1a$fenlei2=1b
//$fenlei1=1a
// ()-sharp
//$wenjian1=2.abc$size$http://a.com/2.file-sharp10.abc$size$http://a.com/10.file
//$fenlei2=1b
// ()-sharp
//$wenjian2=1$size$http://a.com/1.file-sharp*

two

    <item>
      <title>4</title>
      <file>http://a.com/4.file&name=4&bz=*</file>
      *
      <size></size>
      *
      <category>02</category>
      *
    </item>
    <item>
      <title>3</title>
      <file>http://a.com/3.file&name=3&bz=*</file>
      *
      <size></size>
      *
      <category>02</category>
      *
    </item>
//itemcategory=02$fenlei3=2c
//$fenlei3=2c
//()-sharp
//$wenjian3=3$size$http://a.com/3.file-sharp4$size$http://a.com/4.file
 

three

    <item>
      <title>8</title>
      <file>http://a.com/8.file&name=8&bz=*</file>
      *
      <size></size>
      *
      <category>09</category>
      *
    </item>
    <item>
      <title>6</title>
      <file>http://a.com/6.file&name=6&bz=*</file>
      *
      <size></size>
      *
      <category>08</category>
      *
    </item>
    <item>
      <title>5</title>
      <file>http://a.com/5.file&name=5&bz=*</file>
      *
      <size></size>
      *
      <category>06</category>
      *
    </item>
//category=06,08,09 $fenlei4=5d
//$fenlei4=5d()-sharp
//
//$wenjian4=5$size$http://a.com/5.file-sharp6$size$http://a.com/6.file-sharp8$size$http://a.com/8.file

finally want two variables

$fenlei = $fenlei4."$$$".$fenlei3."$$$".$fenlei2."$$$".$fenlei1
$wenjian = $wenjian4."$$$".$wenjian3."$$$".$wenjian2."$$$".$wenjian1
$fenlei4$wenjian4

I am not sure that I can express clearly,
do not understand the place, please reply
Thanksgiving! Be sure to appreciate

Aug.12,2021

$array_data = json_decode(json_encode(
        simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true);
        
    //
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eac45e-47e99.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eac45e-47e99.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?