I need to parse a document with a structure that I've never seen before. It looks like this:
<cat:707>
<begad:00216057>
<zip:48650>
<addr:2100 N. HURON RD, PINCONNING, MI USA>
COUNTRY 10 Mi. N. of Midland, 3 bedroom, 2 baths, appliances furnished, 300x500 finished pole barn on 5 acres, $750/mo. + utilities, 989-965-1118.
<endad>
<cat:710>
<begad:00216094>
<zip:48640>
<addr:1100 S HOMER RD, MIDLAND, MI USA>
IMMEDIATE Occupancy, extra clean, small 2 bedroom by nature center. Pet maybe/extra $400 deposit/references 839-4552
<endad>
How would I parse something like this in php to get the info after the colons (ie: the 707
in the first cat
) and the text before <endad>
?