#include <string.h>
#ifndef _MSC_VER
# include <strings.h>
+# include <unistd.h> /* read */
#else
# define strncasecmp strnicmp
# include <stdlib.h>
+# include <io.h>
#endif
#include <assert.h>
-#include <unistd.h> /* read */
#include <sys/stat.h> /* fstat */
#include <fcntl.h> /* open */
{
if (xmlNodeGetPos(xid, xmid, _print, i) != 0)
{
- char value[STRING_LEN];
+ char *value;
- xmlCopyString(xmid, (char *)&value, STRING_LEN);
- if (_value && _attribute)
+ 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</%s>\n",
_filenames[num], _print, _attribute, _value,
value, _print);
}
+ if (value) free(value);
}
else
{