From 784607f31d8478e9a1246a1932dc23e4ffe4fe99 Mon Sep 17 00:00:00 2001 From: "Lee Thomason (grinliz)" Date: Fri, 24 Feb 2012 16:23:40 -0800 Subject: [PATCH] another round on the element parsing. Test case passes. --- tinyxml2.cpp | 4 +++- tinyxml2.h | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 73a4143..df68f3c 100644 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -629,6 +629,9 @@ char* XMLNode::ParseDeep( char* p, StrPair* parentEnd ) if ( !p ) { DELETE_NODE( node ); node = 0; + if ( !document->Error() ) { + document->SetError( ERROR_PARSING, 0, 0 ); + } break; } @@ -1073,7 +1076,6 @@ char* XMLElement::ParseDeep( char* p, StrPair* strPair ) return p; p = XMLNode::ParseDeep( p, strPair ); - // FIXME: proces end tage here?? return p; } diff --git a/tinyxml2.h b/tinyxml2.h index 9f63514..8136d82 100644 --- a/tinyxml2.h +++ b/tinyxml2.h @@ -588,7 +588,8 @@ enum { ERROR_PARSING_DECLARATION, ERROR_PARSING_UNKNOWN, ERROR_EMPTY_DOCUMENT, - ERROR_MISMATCHED_ELEMENT + ERROR_MISMATCHED_ELEMENT, + ERROR_PARSING };