I'm trying to parse a plain text file, then output it's contents into an HTML table. I'm having trouble with the parsing, though. I'm familiar with the regex functions, but I can't seem to combine everything I need together.
The text file contains one or more sections like this:
<event>Example event name</event>
<location>Example Location</location>
<date>Example date</date>
<description>Long description...</description>
Each event will contain the same attributes. If an event date has NOT already passed, the event should be output to the HTML table. So, I need to read in an event, compare the date with the system date (I can figure that part out), and then output the event as separate fields if appropriate.
Can someone give me some sample code read in one event at a time and output to HTML? Thanks!