mozilla

Compare Revisions

Introduction to using XPath in JavaScript

Change Revisions

Revision 110861:

Revision 110861 by Lies on

Revision 110862:

Revision 110862 by Tom W.M. on

Title:
Introduction to using XPath in JavaScript
Introduction to using XPath in JavaScript
Slug:
Introduction_to_using_XPath_in_JavaScript
Introduction_to_using_XPath_in_JavaScript
Tags:
DOM, XML, XSLT, Extensions, Add-ons, Transforming_XML_with_XSLT, XPath, "Web Development"
DOM, XML, XSLT, Extensions, Add-ons, Transforming_XML_with_XSLT, XPath, "Web Development"
Content:

Revision 110861
Revision 110862
t364function nsResolver( prefix t364function nsResolver(prefix) {
365{365  var ns = {
366  if ( prefix == 'xhtml' ) 
367  {
368    return 'http://www.w3.org/1999/xhtml';366    'xhtml' : 'http://www.w3.org/1999/xhtml',
369  }
370  else if ( prefix == 'mathml' ) 
371  {
372    return 'http://www.w3.org/1998/Math/MathML'367    'mathml': 'http://www.w3.org/1998/Math/MathML'
373  }368  };
374  else369  return ns[prefix] || null;
375  {
376    return null;
377  }

Back to History