diff options
Diffstat (limited to 'indra/llxuixml')
| -rw-r--r-- | indra/llxuixml/llxuiparser.cpp | 12 | ||||
| -rw-r--r-- | indra/llxuixml/llxuiparser.h | 1 | 
2 files changed, 10 insertions, 3 deletions
| diff --git a/indra/llxuixml/llxuiparser.cpp b/indra/llxuixml/llxuiparser.cpp index afc9b38246..e1ad9a5c71 100644 --- a/indra/llxuixml/llxuiparser.cpp +++ b/indra/llxuixml/llxuiparser.cpp @@ -1145,6 +1145,8 @@ void LLSimpleXUIParser::characterDataHandler(void *userData, const char *s, int  void LLSimpleXUIParser::startElement(const char *name, const char **atts)  { +	processText(); +  	typedef boost::tokenizer<boost::char_separator<char> > tokenizer;  	boost::char_separator<char> sep("."); @@ -1238,8 +1240,7 @@ bool LLSimpleXUIParser::readAttributes(const char **atts)  	return any_parsed;  } - -void LLSimpleXUIParser::endElement(const char *name) +void LLSimpleXUIParser::processText()  {  	if (!mTextContents.empty())  	{ @@ -1250,9 +1251,14 @@ void LLSimpleXUIParser::endElement(const char *name)  			mCurAttributeValueBegin = mTextContents.c_str();  			mOutputStack.back().first->submitValue(mNameStack, *this, mParseSilently);  			mNameStack.pop_back(); -			mTextContents.clear();  		} +		mTextContents.clear();  	} +} + +void LLSimpleXUIParser::endElement(const char *name) +{ +	processText();  	if (--mOutputStack.back().second == 0)  	{ diff --git a/indra/llxuixml/llxuiparser.h b/indra/llxuixml/llxuiparser.h index 2522128e03..5c613b0c69 100644 --- a/indra/llxuixml/llxuiparser.h +++ b/indra/llxuixml/llxuiparser.h @@ -218,6 +218,7 @@ private:  	void endElement(const char *name);  	void characterData(const char *s, int len);  	bool readAttributes(const char **atts); +	void processText();  	Parser::name_stack_t			mNameStack;  	struct XML_ParserStruct*		mParser; | 
