How to use jQuery for XML parsing with namespaces

后端 未结 20 1442
隐瞒了意图╮
隐瞒了意图╮ 2020-11-22 10:17

I\'m new to jQuery and would like to parse an XML document.

I\'m able to parse regular XML with the default namespaces but with XML such as:



        
相关标签:
20条回答
  • 2020-11-22 10:44

    For Webkit browsers, you can just leave off the colon. So to find <media:content> in an RSS feed for example, you can do this:

    $(this).find("content");
    
    0 讨论(0)
  • 2020-11-22 10:46

    My solution (because I use a Php proxy) is to replace : namespace by _ ... so no more namespace issues ;-)

    Keep it simple !

    0 讨论(0)
提交回复
热议问题