mirror of
https://github.com/AxioDL/tinyxml2.git
synced 2025-05-15 03:41:30 +00:00
Simplify node logic
This commit is contained in:
parent
ee2c46928e
commit
dbfdd8fdd5
12
tinyxml2.cpp
12
tinyxml2.cpp
@ -855,7 +855,6 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEnd )
|
|||||||
p = node->ParseDeep( p, &endTag );
|
p = node->ParseDeep( p, &endTag );
|
||||||
if ( !p ) {
|
if ( !p ) {
|
||||||
DeleteNode( node );
|
DeleteNode( node );
|
||||||
node = 0;
|
|
||||||
if ( !_document->Error() ) {
|
if ( !_document->Error() ) {
|
||||||
_document->SetError( XML_ERROR_PARSING, 0, 0 );
|
_document->SetError( XML_ERROR_PARSING, 0, 0 );
|
||||||
}
|
}
|
||||||
@ -890,16 +889,11 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEnd )
|
|||||||
}
|
}
|
||||||
if ( mismatch ) {
|
if ( mismatch ) {
|
||||||
_document->SetError( XML_ERROR_MISMATCHED_ELEMENT, node->Value(), 0 );
|
_document->SetError( XML_ERROR_MISMATCHED_ELEMENT, node->Value(), 0 );
|
||||||
p = 0;
|
DeleteNode( node );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( p == 0 ) {
|
InsertEndChild( node );
|
||||||
DeleteNode( node );
|
|
||||||
node = 0;
|
|
||||||
}
|
|
||||||
if ( node ) {
|
|
||||||
this->InsertEndChild( node );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user