*aNode = node.get();
*aNode = node;
static nsresult GetTumblerNode(nsIDOMNode *aParent, const nsString &aTumbler, nsIDOMNode **aNode){  NS_ENSURE_ARG_POINTER(aParent);  NS_ENSURE_ARG_POINTER(aNode);  *aNode = nsnull;  nsAutoString tumbler(aTumbler);  if (tumbler[0] == '/')    tumbler.Cut(0, 1);  nsCOMPtr<nsIDOMNode> node(aParent);  while (!tumbler.IsEmpty() && node) {    PRInt32 sep = tumbler.FindChar('/');    if (sep > 0) {      nsAutoString num;      tumbler.Left(num, sep);      PRInt32 error;      PRInt32 n = num.ToInteger(&error);      if (n <= 0) {        node = nsnull;        break;      }      nsCOMPtr<nsIDOMNode> child;      GetChild(node, n, getter_AddRefs(child));      node = child;    } else {      // Last      PRInt32 error;      PRInt32 n = tumbler.ToInteger(&error);      if (n <= 0) {        node = nsnull;        break;      }      nsCOMPtr<nsIDOMNode> child;      GetChild(node, n, getter_AddRefs(child));      node = child;      break;    }    tumbler.Cut(0, sep + 1);  }  *aNode = node.get();  NS_IF_ADDREF(*aNode);  return NS_OK;}