For the last few weeks, we have been using XMLString::catString() for fast appends to textnodes; something like:

//Only reachable by nodes that support setNodeValue()
append(DOMNode*& pt,XMLCh*& addon) {
        if (addon != NULL and *addon != 0 ) {
                XMLCh* orig = XMLString::replicate(pt->getNodeValue());
                XMLString::catString(orig, addon);
                pt->setNodeValue(orig);
                XMLString::release(&orig);
                XMLString::release(&addon);
        }
}

However, we began to notice occasional crashes, and worked out that XMLString::catString does not check for memory overflow. Is there a means of being able to guarantee additional memory for catString, so that we do not have to transcode everything first?

Thanks for any advice.

Reply via email to