I’m trying to convert an RSS feed into something I can parse with Applescript. To do so, I need to remove a couple lines from the file. I tried “delete line 4”, which compiles fine, but doesn’t actually work, whether it’s deleting it from the text as a variable or from the actual file itself. More specifically, I need to delete the lines marked with a * in this file:
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
*<title>Aaron's Test</title>
*<link></link>
*<description>Test</description>
*<pubDate>Tue, 03 Oct 2006 18:00:55 -0400</pubDate>
*<generator>Schoolhouse (1.1)</generator>
<item>
<title>New Assignment</title>
<link></link>
<description></description>
<schl:course>New Course</schl:course>
<schl:priority></schl:priority>
<schl:kind></schl:kind>
<schl:dueDate>09/16/2006</schl:dueDate>
<schl:startDate>09/16/2006</schl:startDate>
<schl:grade>75</schl:grade>
</item>
<item>
<title>New Assignment</title>
<link></link>
<description></description>
<schl:course>New Course</schl:course>
<schl:priority></schl:priority>
<schl:kind></schl:kind>
<schl:dueDate>07/08/2006</schl:dueDate>
<schl:startDate>07/08/2006</schl:startDate>
<schl:grade>100</schl:grade>
</item>
<item>
<title>New Assignment</title>
<link></link>
<description></description>
<schl:course>New Course</schl:course>
<schl:priority></schl:priority>
<schl:kind></schl:kind>
<schl:dueDate>09/16/2006</schl:dueDate>
<schl:startDate>09/16/2006</schl:startDate>
<schl:grade>87</schl:grade>
</item>
</channel>
</rss>
The content of the lines is not constant, although their numbers (e.g. line 4, line 5, line 6, etc.) are. So, in short - how should I go about removing those lines from the file? Any and all help is greatly appreciated.