Considering the following piece of XSLT
<xsl:template match="/uo_content/attractions/ride"> ...</xsl:template>
How about if we want to get the "template" element from this document?
var template = doc.getElementByTagName("xsl:template")[0]  // <--It does work, but only for IE
var template = doc.getElementByTagName("template")[0]  // <-- Firefox only
var template = doc.getElementByTagName("xsl:template")[0]  || doc.getElementByTagName("template")[0]  //<-- Both
Consider that "xsl" is a namespace but not a part of the tag name, I think Firefox way is better.(Tested in IE6 and FF2)

相关文章:

  • 2021-11-18
  • 2021-10-28
  • 2021-05-03
  • 2021-08-07
  • 2019-01-09
  • 2021-10-13
  • 2022-03-09
  • 2021-10-23
猜你喜欢
  • 2021-07-26
  • 2021-05-29
  • 2022-03-05
  • 2021-05-21
  • 2022-02-04
  • 2022-01-02
  • 2022-03-08
相关资源
相似解决方案