<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<br>It actually does have a closing tag: /&gt;<br><br>XML shorthands the closing tag to save characters when all the info is contained in the attributes, i.e. there is no actual value between the tags.<br><br><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&lt;name&gt;jamesclay (James Clay)&lt;/name&gt; //no attributes, data between tags<br><br><br></span><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">
&lt;link type="text/html" rel="alternate" href="<a href="http://twitter.com/jamesclay/statuses/1483252089">http://twitter.com/jamesclay/statuses/1483252089</a>"/&gt;<br><br>//all data in opening tag attributes, no explicit closing tag, just /&gt;<br><br></span><br>So if you know the format you show below would be consistent, you could key on that "/&gt;" as the end of the string and RFind (reverse find) back to the first "/" you hit.<br><br>That should isolate the actual picture name/format.<br><br>Dave<br><br><br><hr id="stopSpelling">From: ronm@mitchellmedia.co.uk<br>To: xerte@lists.nottingham.ac.uk<br>Date: Sun, 12 Apr 2009 19:22:22 +0100<br>Subject: [Xerte] how to strip out a specific string?<br><br>






<style>
.ExternalClass p.EC_MsoNormal, .ExternalClass li.EC_MsoNormal, .ExternalClass div.EC_MsoNormal
{margin-bottom:.0001pt;font-size:12.0pt;font-family:'Times New Roman','serif';}
.ExternalClass a:link, .ExternalClass span.EC_MsoHyperlink
{color:blue;text-decoration:underline;}
.ExternalClass a:visited, .ExternalClass span.EC_MsoHyperlinkFollowed
{color:purple;text-decoration:underline;}
.ExternalClass p.EC_MsoPlainText, .ExternalClass li.EC_MsoPlainText, .ExternalClass div.EC_MsoPlainText
{margin-bottom:.0001pt;font-size:10.5pt;font-family:Consolas;}
.ExternalClass tt
{font-family:'Courier New';}
.ExternalClass p.EC_MsoAcetate, .ExternalClass li.EC_MsoAcetate, .ExternalClass div.EC_MsoAcetate
{margin-bottom:.0001pt;font-size:8.0pt;font-family:'Tahoma','sans-serif';}
.ExternalClass p.EC_MsoListParagraph, .ExternalClass li.EC_MsoListParagraph, .ExternalClass div.EC_MsoListParagraph
{margin-right:0cm;margin-bottom:0cm;margin-left:36.0pt;margin-bottom:.0001pt;font-size:12.0pt;font-family:'Times New Roman','serif';}
.ExternalClass span.EC_BalloonTextChar
{font-family:'Tahoma','sans-serif';}
.ExternalClass span.EC_EmailStyle21
{font-family:'Calibri','sans-serif';color:#1F497D;}
.ExternalClass span.EC_EmailStyle22
{font-family:'Calibri','sans-serif';color:#1F497D;}
.ExternalClass span.EC_EmailStyle23
{font-family:'Calibri','sans-serif';color:#1F497D;}
.ExternalClass span.EC_EmailStyle24
{font-family:'Calibri','sans-serif';color:#1F497D;}
.ExternalClass span.EC_PlainTextChar
{font-family:Consolas;}
.ExternalClass .EC_MsoChpDefault
{font-size:10.0pt;}
@page Section1
{size:612.0pt 792.0pt;}
.ExternalClass div.EC_Section1
{page:Section1;}
.ExternalClass ol
{margin-bottom:0cm;}
.ExternalClass ul
{margin-bottom:0cm;}
</style>





<div class="EC_Section1">

<div>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">Hi
all</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">I've
been experimenting with the new module method of creating templates and have
created a couple of new templates optimised for a specific purpose which I’ll
happily share with the community once complete. One is an optimised &nbsp;view
of twitter feeds but unless I’m mistaken it seems like the xml isn't
complete for some reason. I can pick up and display the text and links etc ok but
I can't work out how to access the profile pics. Here's an example entry...</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&nbsp;</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&lt;entry&gt;</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&nbsp;&nbsp;&nbsp;
&lt;id&gt;tag:search.twitter.com,2005:1483252089&lt;/id&gt;</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&nbsp;&nbsp;&nbsp;
&lt;published&gt;2009-04-09T12:59:26Z&lt;/published&gt;</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&nbsp;&nbsp;&nbsp;
&lt;link type="text/html" rel="alternate" href="<a href="http://twitter.com/jamesclay/statuses/1483252089">http://twitter.com/jamesclay/statuses/1483252089</a>"/&gt;</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&nbsp;&nbsp;&nbsp;
&lt;title&gt;@ronm123 I meant in a browser, via a second projector
probably.&lt;/title&gt;</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&nbsp;&nbsp;&nbsp;
&lt;content type="html"&gt;&amp;lt;a href="<a href="http://twitter.com/ronm123">http://twitter.com/ronm123</a>"&amp;gt;@ronm123&amp;lt;/a&amp;gt;
I meant in a browser, via a second projector probably.&lt;/content&gt;</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&nbsp;&nbsp;&nbsp;
&lt;updated&gt;2009-04-09T12:59:26Z&lt;/updated&gt;</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&nbsp;&nbsp;&nbsp;
&lt;link type="image/png" rel="image" href="<a href="http://s3.amazonaws.com/twitter_production/profile_images/96243182/Photo14_normal.jpg">http://s3.amazonaws.com/twitter_production/profile_images/96243182/Photo14_normal.jpg</a>"/&gt;</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&nbsp;&nbsp;&nbsp;
&lt;twitter:source&gt;&amp;lt;a href="<a href="http://twitter.com/">http://twitter.com/</a>"&amp;gt;web&amp;lt;/a&amp;gt;&lt;/twitter:source&gt;</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&nbsp;&nbsp;&nbsp;
&lt;author&gt;</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;name&gt;jamesclay (James Clay)&lt;/name&gt;</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;uri&gt;<a href="http://twitter.com/jamesclay%3C/uri">http://twitter.com/jamesclay&lt;/uri</a>&gt;</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&nbsp;&nbsp;&nbsp;
&lt;/author&gt;</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&nbsp;
&lt;/entry&gt;</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&nbsp;</span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">I
want to be able to strip out the path to the .jpg e.g. <a href="http://s3.amazonaws.com/twitter_production/profile_images/96243182/Photo14_normal.jpg">http://s3.amazonaws.com/twitter_production/profile_images/96243182/Photo14_normal.jpg</a></span></p>

<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&nbsp;</span></p>

<p class="EC_MsoNormal"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">But
can't work out how to do that. I can access the content of &lt;id&gt;,&lt;title&gt;
and even &lt;name&gt; but the tag containing the profile pic link e.g. &lt;link
type=”image/png” doesn’t have a closing tag. Presumably I
need some kind of function + regular expression - any suggestions?</span></p>

<p class="EC_MsoNormal"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">&nbsp;</span></p>

<p class="EC_MsoNormal"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">Cheers</span></p>

<p class="EC_MsoNormal"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">Ron<span style="color: rgb(31, 73, 125);"></span></span></p>

</div>

</div><br /><hr />Rediscover Hotmail®: Get e-mail storage that grows with you.  <a href='http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009' target='_new'>Check it out.</a></body>
</html>