def node(self, tag, idx):
if idx is not None:<EOL><INDENT>self.path.append("<STR_LIT>" % (tag, idx))<EOL><DEDENT>else:<EOL><INDENT>self.path.append(tag)<EOL><DEDENT>return self<EOL>
Adds tag and index to the path; they will be popped off when
the corresponding 'with' statement exits.

:param tag: The element tag
:param idx: If not None, the integer index of the element
            within its parent.  Not included in the path
            element if None.