I have this format of xml which is created automatically and was wondering how to iterate through it and save data into mysql
<sales>
<site_id="000001" sale_id="80" end_date="20170826" end_time="112420" />
<site_id="000002" sale_id="81" end_date="20170828" end_time="101001" />
<site_id="000003" sale_id="82" end_date="20170828" end_time="101001" />
</sales>
I am okay with inserting into database, however it is the iteration and capturing in a variable that I am kind of stuck with
<site side_id="000"etc<site_id="000"is not valid XML so won't be parsed. Also need a closing tag</site>