Search Results

Search found 4 results on 1 pages for 'mbrevoort'.

Page 1/1 | 1 

  • How to unencode escaped XML with xQuery

    - by mbrevoort
    I have a variable in xQuery of type xs:string with the value of an encoded HTML snippet (the content of a twitter tweet). It looks like this: Headlines-Today &#8226; AP sources: &lt;b&gt;Obama&lt;/b&gt; pick for Justice post withdraws : News - Rest Of World - &lt;a href=&quot;http://shar.es/mqMAG&quot;&gt;http://shar.es/mqMAG&lt;/a&gt; When I try to write this out in an HTML block, I need the string to be unescaped so that the HTML snippet will be interpreted by the browser. Instead the string is getting written out as is and the browser is rendering it as just text (so you see <a href="blah.... ). Here's how I'm writing out this string: {$entry/atom:content/text()} How can I have the escaped characters unencoded so it writes < rather tha &lt; ? I've tried to do a replacelike this but it always replaces the &lt; with &lt; ! fn:replace($s, "&lt;", "<")

    Read the article

  • Loading Facebook fb:profile-pic via AJAX in Facebook Connect site

    - by mbrevoort
    After a page loads, I'm making an AJAX request to pull down an HTML chunk that contains tags representing a Facebook user profile picture. I append the result to a point in the DOM but the logos don't load, instead all I see is the default silhouette. Here's simply how I'm loading the HTML chunk with jQuery $.ajax({ url: "/facebookprofiles" success: function(result) { $('#profiles').append(result); } }); The HTML that I'm appending is a list of diffs like this: <div class="status Accepted"> <fb:profile-pic class="image" facebook-logo="true" linked="true" size="square" uid="1796055648"></fb:profile-pic> <p> <strong>Corona Kingsly</strong>My Status Update<br/> <span style="font-size: 0.8em">52 minutes ago</span> </p> </div> Any ideas? I assume the fb tags are not being processed once the dom is loaded. Is there any way to make that happen? I'm not seeing any exceptions or errors in my Firebug console. Thanks

    Read the article

  • How to get node without children in xQuery?

    - by mbrevoort
    So I have two nodes of elements that I'm essentially trying to join. I want the top level node to stay the same but the child nodes to be replaced by those cross referenced. Given: <stuff> <item foo="foo" boo="1"/> <item foo="bar" boo="2" /> <item foo="baz" boo="3"/> <item foo="blah boo="4""/> </stuff> <list a="1" b="2"> <foo>bar</foo> <foo>baz</foo> </list> I want to loop through "list" and cross reference elements in "stuff" for this result: <list a="1" b="2"> <item foo="bar" boo="2" /> <item foo="baz" boo="3"/> </list> I want to do this without having to know about what attributes might be on "list". In other words I don't want to have to explicitly call them out like attribute a { $list/@a }, attribute b { $list/@b }

    Read the article

1