<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:odc="urn:schemas-microsoft-com:office:odc" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:D="DAV:" xmlns:mt="http://schemas.microsoft.com/sharepoint/soap/meetings/" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcs="http://schemas.microsoft.com/data/udc/soap" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:udcp2p="http://schemas.microsoft.com/data/udc/parttopart" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:dsss="http://schemas.microsoft.com/office/2006/digsig-setup" xmlns:dssi="http://schemas.microsoft.com/office/2006/digsig" xmlns:mdssi="http://schemas.openxmlformats.org/package/2006/digital-signature" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:spwp="http://microsoft.com/sharepoint/webpartpages" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:pptsl="http://schemas.microsoft.com/sharepoint/soap/SlideLibrary/" xmlns:spsl="http://microsoft.com/webservices/SharePointPortalServer/PublishedLinksService" xmlns:Z="urn:schemas-microsoft-com:" xmlns:st="" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.ecapple-style-span
        {mso-style-name:ec_apple-style-span;}
span.ecapple-converted-space
        {mso-style-name:ec_apple-converted-space;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-GB link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>In Xerte the replace method is added to the String class, so it’s<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>myString.replace(myRegExp, ‘replaceString’);<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal style='margin-left:36.0pt'><b><span lang=EN-US
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
xerte-bounces@lists.nottingham.ac.uk
[mailto:xerte-bounces@lists.nottingham.ac.uk] <b>On Behalf Of </b>Dave Burnett<br>
<b>Sent:</b> Monday, April 13, 2009 2:17 AM<br>
<b>To:</b> Xerte list<br>
<b>Subject:</b> RE: [Xerte] how to strip out a specific string?<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal style='margin-left:36.0pt'><o:p> </o:p></p>
<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:36.0pt'><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><br>
<br>
I could be imagining things, but I thought Julian just posted something about
Regular Expressions now being supported.<br>
<br>
If that is true, then this would work:<br>
<br>
new_xml = replace(original_xml, /the_string_here/g, "");<br>
<br>
the /g at the end if the string parameter means "global", so it would
replace all the instances of that URL with "".<br>
<br>
Dave<br>
<br>
<o:p></o:p></span></p>
<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>
<hr size=2 width="100%" align=center id=stopSpelling>
</span></div>
<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:36.0pt'><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>From:
ronm@mitchellmedia.co.uk<br>
To: xerte@lists.nottingham.ac.uk<br>
Subject: Re: [Xerte] how to strip out a specific string?<br>
Date: Sun, 12 Apr 2009 20:19:55 +0100<o:p></o:p></span></p>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>Cheers Dave that's very helpful - I'll give
that a try.<o:p></o:p></span></p>
</div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p>
<div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>On 12 Apr 2009, at 19:35, Dave Burnett
wrote:<o:p></o:p></span></p>
</div>
<blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p>
<div>
<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:36.0pt'><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'><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><span style='font-size:11.0pt;font-family:"Arial","sans-serif";
color:black'><name>jamesclay (James Clay)</name> //no attributes,
data between tags<br>
<br>
<br>
<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><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'><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>
<o:p></o:p></span></p>
<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'>
<hr size=2 width="100%" align=center id="EC_stopSpelling">
</span></div>
<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:36.0pt'><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'>From:<span class=ecapple-converted-space> </span><a
href="mailto:ronm@mitchellmedia.co.uk">ronm@mitchellmedia.co.uk</a><br>
To:<span class=ecapple-converted-space> </span><a
href="mailto:xerte@lists.nottingham.ac.uk">xerte@lists.nottingham.ac.uk</a><br>
Date: Sun, 12 Apr 2009 19:22:22 +0100<br>
Subject: [Xerte] how to strip out a specific string?<o:p></o:p></span></p>
<div>
<div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'>Hi all</span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'>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><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'> </span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'><entry></span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'> <id>tag:search.twitter.com,2005:1483252089</id></span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'>
<published>2009-04-09T12:59:26Z</published></span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'> <link
type="text/html" rel="alternate" href="<a
href="http://twitter.com/jamesclay/statuses/1483252089">http://twitter.com/jamesclay/statuses/1483252089</a>"/></span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'>
<title>@ronm123 I meant in a browser, via a second projector
probably.</title></span><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'> <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><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'>
<updated>2009-04-09T12:59:26Z</updated></span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'> <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><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'>
<twitter:source>&lt;a href="<a href="http://twitter.com/">http://twitter.com/</a>"&gt;web&lt;/a&gt;</twitter:source></span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'> <author></span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'>
<name>jamesclay (James Clay)</name></span><span style='font-size:
10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'>
<uri><a href="http://twitter.com/jamesclay%3C/uri">http://twitter.com/jamesclay</uri</a>></span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'>
</author></span><span style='font-size:10.0pt;font-family:"Verdana","sans-serif";
color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'> </entry></span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'> </span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'>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><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'> </span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'>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><span style='font-size:
10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'> </span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'>Cheers</span><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:11.0pt;
font-family:"Arial","sans-serif";color:black'>Ron</span><span style='font-size:
10.0pt;font-family:"Verdana","sans-serif";color:black'><o:p></o:p></span></p>
</div>
</div>
</div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:black'><o:p> </o:p></span></p>
<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif";color:black'>
<hr size=2 width="100%" align=center>
</span></div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif";color:black'>Rediscover Hotmail®: Get e-mail
storage that grows with you.<span class=ecapple-converted-space> </span><a
href="http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage1_042009">Check
it out.</a>_______________________________________________<br>
Xerte mailing list<br>
<a href="mailto:Xerte@lists.nottingham.ac.uk">Xerte@lists.nottingham.ac.uk</a><br>
<a href="http://lists.nottingham.ac.uk/mailman/listinfo/xerte">http://lists.nottingham.ac.uk/mailman/listinfo/xerte</a><o:p></o:p></span></p>
</div>
</blockquote>
</div>
<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:36.0pt'><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p>
<div class=MsoNormal align=center style='margin-left:36.0pt;text-align:center'><span
style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>
<hr size=2 width="100%" align=center>
</span></div>
<p class=MsoNormal style='margin-left:36.0pt'><span style='font-size:10.0pt;
font-family:"Verdana","sans-serif"'>Rediscover Hotmail®: Now available on your
iPhone or BlackBerry <a
href="http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Mobile1_042009"
target="_new">Check it out.</a><o:p></o:p></span></p>
</div>
</body>
</html>