You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
当 extensionElements 元素 text中存在换行时 xtr.next(); 方法会导致数据被覆盖
When there is a line break in the extensionElements element text, xtr. text(); Method can cause data to be overwritten Expected behavior
A clear and concise description of what you expected to happen.
Code
while (!readyWithExtensionElement && xtr.hasNext()) {
xtr.next();
if (xtr.isCharacters() || XMLStreamReader.CDATA == xtr.getEventType()) {
if (StringUtils.isNotEmpty(xtr.getText().trim())) {
//fix set to append
extensionElement.setElementText(xtr.getText().trim());
}
} else if (xtr.isStartElement()) {
ExtensionElement childExtensionElement = parseExtensionElement(xtr);
extensionElement.addChildElement(childExtensionElement);
} else if (xtr.isEndElement() && extensionElement.getName().equalsIgnoreCase(xtr.getLocalName())) {
readyWithExtensionElement = true;
}
}
The text was updated successfully, but these errors were encountered:
Describe the bug
当 extensionElements 元素 text中存在换行时 xtr.next(); 方法会导致数据被覆盖
When there is a line break in the extensionElements element text, xtr. text(); Method can cause data to be overwritten
Expected behavior
A clear and concise description of what you expected to happen.
Code
while (!readyWithExtensionElement && xtr.hasNext()) {
xtr.next();
if (xtr.isCharacters() || XMLStreamReader.CDATA == xtr.getEventType()) {
if (StringUtils.isNotEmpty(xtr.getText().trim())) {
//fix set to append
extensionElement.setElementText(xtr.getText().trim());
}
} else if (xtr.isStartElement()) {
ExtensionElement childExtensionElement = parseExtensionElement(xtr);
extensionElement.addChildElement(childExtensionElement);
} else if (xtr.isEndElement() && extensionElement.getName().equalsIgnoreCase(xtr.getLocalName())) {
readyWithExtensionElement = true;
}
}
The text was updated successfully, but these errors were encountered: