1

I've been struggling with how to pull the text from inside a tag that contains a colon in an XML file (my original question is here). In my specific case, I'm working with the Google Picasa API and trying to grab the "gphoto:id" tag. This was wasn't working:

var albumId = $(this).children('gphoto:id').text();

I found the answer to my problem here, but I'm unfamiliar with the JQuery syntax used to fix the problem:

$('[nodeName=rs:data],data')

or, in the context of my question:

var albumId = $(this).find('[nodeName=gphoto:id]').text();

Can someone provide some insight into this workaround?

Community
  • 1
  • 1
charliesneath
  • 1,917
  • 3
  • 21
  • 36

1 Answers1

0

Figured it out. This uses the Attribute Equals Selector.

charliesneath
  • 1,917
  • 3
  • 21
  • 36