Change-Id: I25d1f7c13013ed9b9a7ea499709c35d29d715df9
return -1;
}
+ // Avoid to parse non-xml file
+ char* file_ext = strrchr(path, '.');
+ if (NULL == ++file_ext || (file_ext && 0 != strncmp("xml", file_ext, strlen(file_ext)))) {
+ SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] File extention is not XML type, file_ext(%s)", (file_ext) ? file_ext : "NULL");
+ return -1;
+ }
+
bool isTextsize = false;
xmlDocPtr doc = NULL;
xmlNodePtr cur = NULL;