X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=utils%2Fxmlgrep%2Fxmlgrep.c;h=23577b0c8d2415a25343817e413c1dcd33836cf1;hb=a89a28c4e62a63e05b6b889274fa848ea2bda007;hp=35add47a5d65ca7022108200db213bedfb873149;hpb=4e7fde12b33e90eab30440afbb8ef58f5821a571;p=flightgear.git diff --git a/utils/xmlgrep/xmlgrep.c b/utils/xmlgrep/xmlgrep.c index 35add47a5..23577b0c8 100644 --- a/utils/xmlgrep/xmlgrep.c +++ b/utils/xmlgrep/xmlgrep.c @@ -218,7 +218,12 @@ void walk_the_tree(size_t num, void *xid, char *tree) value = xmlGetString(xmid); if (_value && _attribute && value) { +#if 1 + char *a = xmlAttributeGetString(xmid, _attribute); + if (a && !strcmp(a, _value)) +#else if (!xmlAttributeCompareString(xmid, _attribute, _value)) +#endif { printf("%s: <%s %s=\"%s\">%s\n", _filenames[num], _print, _attribute, _value,