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
If XMLElement has any leading comments before XMLText Child node a new XMLText Child node is created and added to the XMLElement instead of replacing the existing XMLText Child element.
If XMLElement has any leading comments before XMLText Child node a new XMLText Child node is created and added to the XMLElement instead of replacing the existing XMLText Child element.
Solution (replace existing with):
void XMLElement::SetText( const char* inText )
{
// [email protected] - Added missing skip comment node
XMLNode* node = FirstChild();
while(node) {
if(node->ToComment()) {
node = node->NextSibling();
continue;
}
break;
}
//if ( FirstChild() && FirstChild()->ToText() )
// FirstChild()->SetValue( inText );
if (node && node->ToText() )
node->SetValue( inText );
else {
XMLText* theText = GetDocument()->NewText( inText );
InsertFirstChild( theText );
}
}
The text was updated successfully, but these errors were encountered: