mirror of
https://github.com/openharmony/js_api_module.git
synced 2026-07-19 18:23:43 -04:00
Fix the missing attribute of xmlPullParse parsing result
Fix the xml logical code issue:https://gitee.com/openharmony/js_api_module/issues/I5FHP8 Signed-off-by: lihucheng <lihucheng1@huawei.com>
This commit is contained in:
+5
-2
@@ -531,7 +531,9 @@ namespace OHOS::xml {
|
||||
napi_call_function(env, global, attrFunc_, argc, argv, &returnVal);
|
||||
bool bRec = false;
|
||||
napi_get_value_bool(env, returnVal, &bRec);
|
||||
return bRec;
|
||||
if (!bRec) {
|
||||
return bRec;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -560,6 +562,7 @@ namespace OHOS::xml {
|
||||
}
|
||||
if (attrFunc_ && attriCount_) {
|
||||
bRec = ParseAttri(env, thisVar);
|
||||
attriCount_ = 0;
|
||||
}
|
||||
if (attrFunc_ && attriCount_ && !bRec) {
|
||||
break;
|
||||
@@ -898,7 +901,7 @@ namespace OHOS::xml {
|
||||
bool throwOnResolveFailure, TextEnum textEnum)
|
||||
{
|
||||
size_t start = position_;
|
||||
std::string result = " ";
|
||||
std::string result = "";
|
||||
if (textEnum == TextEnum::TEXT && text_ != "") {
|
||||
result.append(text_);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user