I have a text file that has data wrapped between tags. The tags are:
<title>
<url>
<pubDate>
So, the entries look like this:
<title>title 1</title>
<url>url 1</url>
<pubDate>pubDate 1</pubDate>
<title>title 2</title>
<url>url 2</url>
<pubDate>pubDate 2</pubDate>
<title>title 3</title>
<url>url 3</url>
<pubDate>pubDate 3</pubDate>
I need a script that reads this text file and prepares each item to be inserted into a database. The query will look like this:
insert into table (title,url,pubdate) values ($title,$url,$pubdate)....