WinJS.xhr (Metro) を使用して取得した、このような HTML テキストがあります。
HTML
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
</style>
</head>
<body>
<div id="getMe">
Something
</div>
</body>
</html>
セレクターを使用するために、JQuery オブジェクトに変換したいと考えています。例えば:
$("#getMe").text("Something different");
@Mark:これを使用しようとしましたが、テキストを取得できません。
var yourString = "<html><body><div id=\"getMe\">TEST</div></body></html>"// somehow set to the above string
$el = $(yourString).find("#getMe");
console.log($el.text());