diff --git a/ameasure2/src/provisioner/MeasurementProvisionerResultsXml.cpp b/ameasure2/src/provisioner/MeasurementProvisionerResultsXml.cpp index 8f6e0c454903db3416cbf30baa917483f61fc143..221b9ce6a6883a585b906516073df4018001613f 100644 --- a/ameasure2/src/provisioner/MeasurementProvisionerResultsXml.cpp +++ b/ameasure2/src/provisioner/MeasurementProvisionerResultsXml.cpp @@ -236,11 +236,17 @@ void MeasurementProvisionerResultsXml::parsePipelineStatus ( MPRPipelineResults FromXMLParserHelper::popToken ( iter, Token::TokenType::END_ELEMENT, EXIT_CODE_TAG ); } else if ( data == ERROR_ORIGIN_TAG ) { FromXMLParserHelper::popToken ( iter, Token::TokenType::START_ELEMENT, ERROR_ORIGIN_TAG ); - mprpr.pipelineStatus.errorOrigin = FromXMLParserHelper::popTokenData ( iter, Token::TokenType::CHARACTER ); + + if ( FromXMLParserHelper::isTokenType ( iter, Token::TokenType::CHARACTER ) ) + mprpr.pipelineStatus.errorOrigin = FromXMLParserHelper::popTokenData ( iter, Token::TokenType::CHARACTER ); + FromXMLParserHelper::popToken ( iter, Token::TokenType::END_ELEMENT, ERROR_ORIGIN_TAG ); } else if ( data == ERROR_VALUE_TAG ) { FromXMLParserHelper::popToken ( iter, Token::TokenType::START_ELEMENT, ERROR_VALUE_TAG ); - mprpr.pipelineStatus.errorValue = FromXMLParserHelper::popTokenData ( iter, Token::TokenType::CHARACTER ); + + if ( FromXMLParserHelper::isTokenType ( iter, Token::TokenType::CHARACTER ) ) + mprpr.pipelineStatus.errorValue = FromXMLParserHelper::popTokenData ( iter, Token::TokenType::CHARACTER ); + FromXMLParserHelper::popToken ( iter, Token::TokenType::END_ELEMENT, ERROR_VALUE_TAG ); } else { break;