summaryrefslogtreecommitdiff
path: root/tree.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2002-09-17 23:04:40 +0000
committerDaniel Veillard <veillard@src.gnome.org>2002-09-17 23:04:40 +0000
commit0f04f8ed6147227273f43004486019e547fbfd4d (patch)
tree765b8706d530914f0134015a0d9a98886a227a1c /tree.c
parenta646cfdb14097f72d3b0ce9b0f43126934d8efd3 (diff)
downloadlibxml2-0f04f8ed6147227273f43004486019e547fbfd4d.tar.gz
fixed another stupid bug in xmlGetNodePath() --version now report the
* tree.c: fixed another stupid bug in xmlGetNodePath() * xmllint.c: --version now report the options compiled in Daniel
Diffstat (limited to 'tree.c')
-rw-r--r--tree.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tree.c b/tree.c
index faf33f7a..7177ae6c 100644
--- a/tree.c
+++ b/tree.c
@@ -3484,7 +3484,8 @@ xmlGetNodePath(xmlNodePtr node)
*/
tmp = cur->prev;
while (tmp != NULL) {
- if (xmlStrEqual(cur->name, tmp->name))
+ if ((tmp->type == XML_ELEMENT_NODE) &&
+ (xmlStrEqual(cur->name, tmp->name)))
occur++;
tmp = tmp->prev;
}