xmlNodeGetPath() returns an invalid result for attributes. It would appear as
/node/node attr
instead of
/node/node/@attr
The simple patch attached fixes this.
Attachment: getpath.diff Description: Binary data