firefox didn't like the xml as you pasted it.. the last
</com.syndic.data.metadata.TagEntity
isn't closed.


On 12/22/06, Galen Palmer <[EMAIL PROTECTED]> wrote:

I'm trying to implement a web2.0y tag interface.  I did a subversion
update and built jquery.pack.js and tested on more time before posting
this question so I think I am completely up to date.

Anway, I want to iterate through a set of XML tags the JQuery way but
the loop never appears to be entered...

JavaScript

  function loadTags() {
    $.get("tag.ajx",
        { id: "${ model.item.id}" },
        function(xml) {

      var x = xml.getElementsByTagName("com.syndic.data.metadata.TagEntity
");

      // this alert fires and displays a length of 3
      alert(" x = "+ x +" length = "+ x.length);

      var content = "&nbsp;"
      $("com.syndic.data.metadata.TagEntity", xml).each(function() {
        content = content
            +"&nbsp;<a href=\"http://www.technorati.com/tag/";
            + $(this).text()
            +"\">"
            + $(this).val()
            +"</a>";
        // PROBLEM: this alert never fires...
        alert("text = "+ $(this) +" -- "+ $(this).text() +" -- "+
$(this).val());
      });

      $('#tags').html(content);
    });
  }



Header as returned from the server

Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONIDSSO=E66E6A221BD1014B3E872DA46729FAC0;
Expires=Thu, 01-Jan-1970 00:00:10 GMT
Content-Type: text/xml
Date: Fri, 22 Dec 2006 16:21:29 GMT
Connection: close


XML as returned from the server
<?xml version="1.0" encoding="UTF-8"?>

<ajax>
  <namespace>USER_TAG</namespace>
  <name>name</name>
  <com.syndic.data.metadata.TagEntity id="1219" name="help"
namespace="USER_TAG">help</com.syndic.data.metadata.TagEntity>
  <com.syndic.data.metadata.TagEntity id="1220" name="technorati"
namespace="USER_TAG">technorati</com.syndic.data.metadata.TagEntity>
  <com.syndic.data.metadata.TagEntity id="1247" name="b;ah"
namespace="USER_TAG">bah</com.syndic.data.metadata.TagEntity
</ajax>

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/




--
Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to