Q:

Using '.' (dot or period) in an XPath expression

Can someone tell me the difference between the following XPath expressions? 
/IntuitResponse/QueryResponse/Bill/./Id
/IntuitResponse/QueryResponse/Bill/Id

I've tried using both to parse an XML document from the document root and I'm getting the same response. 

A:

Those two XPaths are equivalent. 
The abbreviation for self::node() (.) is more useful within a predicate.  For example,
/IntuitResponse/QueryResponse/Bill/Id[. = 'abc']

would select only those Id elements whose string value is 'abc'.
Also, . is useful to introduce a relative path.  For example,
./Id

would select only those Id elements that are a child of the current context node.

