Hi Marian,
you need to store the pointer in a temp variable, if you want to reuse it.
XMLCh* name=XMLString::transcode("Name");
if(XMLString::equals(node->getNodeName(), name))
{
...
}
XMLString::release(&name);
But if you are going to use this code several times, you can improve
its performances by storing the transcoded strings in the code:
static XMLCh name[]={ chLatin_N, chLatin_a, chLatin_m, chLatin_e, chNull };
if(XMLString::equals(node->getNodeName(), name))
{
...
}
Hope this helps,
Alberto
At 02.01 23/04/2007 -0700, Marian Rosello wrote:
Hi,
this is a very general question, I am pretty sure I am not using
XMLString::release as I should, could anyone with me some example of how
this should be use.
For instance, if my code does something like :
if (XMLString::equals(node->getNodeName(),XMLString::transcode("Name")))
{
...
}
How I am suppose to relase the XMLString after that?
Thank you very much. I've been looking for some documentation on the subject
but I only find the Xerces-C reference and it's just not enough.
Regards,
Marian.
--
View this message in context:
http://www.nabble.com/How-to-use-XMLString%3A%3Arelease-tf3630004.html#a10136190
Sent from the Xerces - C - Users mailing list archive at Nabble.com.