<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: /><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';"><name>jamesclay (James Clay)</name> //no attributes, data between tags<br><br><br></span><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">
<link type="text/html" rel="alternate" href="<a href="http://twitter.com/jamesclay/statuses/1483252089">http://twitter.com/jamesclay/statuses/1483252089</a>"/><br><br>//all data in opening tag attributes, no explicit closing tag, just /><br><br></span><br>So if you know the format you show below would be consistent, you could key on that "/>" 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 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';"> </span></p>
<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';"><entry></span></p>
<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">
<id>tag:search.twitter.com,2005:1483252089</id></span></p>
<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">
<published>2009-04-09T12:59:26Z</published></span></p>
<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">
<link type="text/html" rel="alternate" href="<a href="http://twitter.com/jamesclay/statuses/1483252089">http://twitter.com/jamesclay/statuses/1483252089</a>"/></span></p>
<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">
<title>@ronm123 I meant in a browser, via a second projector
probably.</title></span></p>
<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">
<content type="html">&lt;a href="<a href="http://twitter.com/ronm123">http://twitter.com/ronm123</a>"&gt;@ronm123&lt;/a&gt;
I meant in a browser, via a second projector probably.</content></span></p>
<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">
<updated>2009-04-09T12:59:26Z</updated></span></p>
<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">
<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>"/></span></p>
<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">
<twitter:source>&lt;a href="<a href="http://twitter.com/">http://twitter.com/</a>"&gt;web&lt;/a&gt;</twitter:source></span></p>
<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">
<author></span></p>
<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">
<name>jamesclay (James Clay)</name></span></p>
<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">
<uri><a href="http://twitter.com/jamesclay%3C/uri">http://twitter.com/jamesclay</uri</a>></span></p>
<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">
</author></span></p>
<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';">
</entry></span></p>
<p class="EC_MsoPlainText"><span style="font-size: 11pt; font-family: 'Arial','sans-serif';"> </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';"> </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 <id>,<title>
and even <name> but the tag containing the profile pic link e.g. <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';"> </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>