mirror of
https://github.com/openharmony/js_api_module.git
synced 2026-07-19 18:23:43 -04:00
Modify the xml code of the api warehouse
Modify function parameters and add a judgment issue:https://gitee.com/openharmony/js_api_module/issues/I582UQ Signed-off-by: xllify <lixinlong18@huawei.com>
This commit is contained in:
+11
-8
@@ -821,8 +821,8 @@ namespace OHOS::xml {
|
||||
ParseEntityFunc(start, out, isEntityToken, textEnum);
|
||||
}
|
||||
|
||||
bool XmlPullParser::ParseTagValueFunc(char c, bool bFlag, TextEnum textEnum,
|
||||
size_t &start, std::string& result)
|
||||
bool XmlPullParser::ParseTagValueFunc(char &c, bool bFlag, TextEnum textEnum,
|
||||
size_t &start, std::string &result)
|
||||
{
|
||||
if (c == '\r') {
|
||||
if ((position_ + 1 < max_ || DealLength(2)) && strXml_[position_ + 1] == '\n') { // 2: number of args
|
||||
@@ -903,18 +903,18 @@ namespace OHOS::xml {
|
||||
result.append(text_);
|
||||
}
|
||||
while (true) {
|
||||
size_t iRecv = ParseTagValueInner(start, result, delimiter, textEnum, resolveEntities);
|
||||
if (iRecv == 0) {
|
||||
char cRecv = static_cast<char>(ParseTagValueInner(start, result, delimiter, textEnum, resolveEntities));
|
||||
if (cRecv == 0) {
|
||||
return result;
|
||||
} else if (iRecv == 1) {
|
||||
} else if (cRecv == 1) {
|
||||
break;
|
||||
} else if (iRecv == 2) { // 2: break flag
|
||||
} else if (cRecv == 2) { // 2: break flag
|
||||
continue;
|
||||
} else if (!ParseTagValueFunc(static_cast<char>(iRecv), throwOnResolveFailure, textEnum, start, result)) {
|
||||
} else if (!ParseTagValueFunc(cRecv, throwOnResolveFailure, textEnum, start, result)) {
|
||||
continue;
|
||||
}
|
||||
++position_;
|
||||
result = result + static_cast<char>(iRecv);
|
||||
result = result + static_cast<char>(cRecv);
|
||||
start = position_;
|
||||
}
|
||||
result.append(strXml_, start, position_ - start);
|
||||
@@ -1443,6 +1443,9 @@ namespace OHOS::xml {
|
||||
} else {
|
||||
xmlPullParserError_ = "Expected entity value or external ID";
|
||||
}
|
||||
if (generalEntity && bDocDecl) {
|
||||
documentEntities[name] = entityValue;
|
||||
}
|
||||
SkipInvalidChar();
|
||||
SkipChar('>');
|
||||
}
|
||||
|
||||
+1
-1
@@ -367,7 +367,7 @@ namespace OHOS::xml {
|
||||
bool ParseStartTagFunc(bool xmldecl, bool throwOnResolveFailure);
|
||||
TagEnum ParseOneTagFunc();
|
||||
size_t ParseTagValueInner(size_t &start, std::string &result, char delimiter, TextEnum textEnum, bool bFlag);
|
||||
bool ParseTagValueFunc(char c, bool bFlag, TextEnum textEnum, size_t &start, std::string &result);
|
||||
bool ParseTagValueFunc(char &c, bool bFlag, TextEnum textEnum, size_t &start, std::string &result);
|
||||
void MakeStrUpper(std::string &src) const;
|
||||
TagEnum DealLtGroup();
|
||||
void DealWhiteSpace(unsigned char c);
|
||||
|
||||
Reference in New Issue
Block a user