- else if (XMLString::equals(e->getLocalName(), Regex) && e->hasAttributeNS(NULL, match)) {
- auto_ptr_char m(e->getAttributeNS(NULL, match));
- auto_ptr_char repl(e->getFirstChild()->getNodeValue());
- m_regex.push_back(make_pair((*flag==chDigit_1 || *flag==chLatin_t), pair<string,string>(m.get(), repl.get())));
+ else if (XMLString::equals(e->getLocalName(), Regex) && e->hasAttributeNS(nullptr, match)) {
+ auto_ptr_char m(e->getAttributeNS(nullptr, match));
+ auto_ptr_char repl(e->getTextContent());
+ if (m.get() && *m.get() && repl.get() && *repl.get())
+ m_regex.push_back(tuple<bool,string,string>(flag, m.get(), repl.get()));