XPath

The thumb rule of XPath:

 

/child::lectures/child::lecture[@number='0']

  • /child::lectures is the step part. (Generally, child:: can be omitted)
  • child is the axis part. (Also can be decedent, ancestor, attribute)
  • lecture is the node test part.
  • [@number='0'] is the predicate part. (@number is abbreviation of attribute::number )

The whole cause is called location path.

posted @ 2015-07-16 23:44  kid551  阅读(116)  评论(0编辑  收藏  举报