日期:2014-05-16  浏览次数:20347 次

在javascript中使用xpath

原文来自:?https://developer.mozilla.org/en/Introduction_to_using_XPath_in_JavaScript

?

?

Introduction to using XPath in JavaScript

  • EDIT
  • WATCH

TABLE OF CONTENTS

  1. document.evaluate
    1. Parameters
    2. Return Value
    3. Implementing a Default Namespace Resolver
    4. Notes
    5. Specifying the Return Type
      1. Simple Types
      2. Node-Set Types
      3. The ANY_TYPE Constant
  2. Examples
    1. Within an HTML Document
    2. Evaluating against an XML document within an Extension
    3. Note
  3. Appendix
      1. Implementing a User Defined Namespace Resolver
      2. Implementing a default namespace for XML documents
      3. Using XPath functions to reference elements with a default namespace
      4. Getting specifically namespaced elements and attributes regardless of prefix
      5. XPathResult Defined Constants