[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-c-dev
Subject:    Re: XMLString::transcode and XMLString::release mechanism
From:       David Bertoni <dbertoni () apache ! org>
Date:       2008-11-08 1:52:10
Message-ID: 4914F0CA.1030702 () apache ! org
[Download RAW message or body]

ludocluba wrote:
> A better idea for the node name comparsions is to avoid transcoding, and 
> use some constant UTF-16 strings instead:
> 
> #include "xercesc/util/XMLUni.h"
> 
> XERCES_CPP_NAMESPACE_USE
> 
> const XMLCh node1[] = {
>      chLatin_n,
>      chLatin_o,
>      chLatin_d,
>      chLatin_e,
>      chDigit_1,
>      chNull
> };
> 
> Thanks for all,
> I have a lot of node to compare so I don't think I will create a const XMLCh
> for all the node name, but I will think of it.
Then perhaps you should transcode all of the strings up front when your 
application starts, and use that set of strings, instead of transcoding 
and releasing constantly in a loop.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic