At 09.31 17/09/2007 -0500, EXT-Pennington, Dale K wrote:
OK, this is more confirming what I know but one issue in my app is to
try and be somewhat efficient.
Therefore since we will be converting the same format to/from XML many
times, it is preferred to only define the tag strings once in XMLChar
format, and not convert many times.
Right.
The confirmation is that the XMLString::transpose function is only valid
after XMLPlatformUtils::Initialize is called.
XMLString::transcode must be used after Initialize is called, and
before Terminate is called; but be sure to use only ASCII strings, or
you could have nasty surprises if your application is invoked on
machines having different locales.
If the above is true, my options are to either statically define the
strings as arrays of XMLChars, defining each character (as I have seen
in several samples). In which case, I would most like gen a quick
utility to take a string and give the the chLatin_x array equivalent.
This is the best option you have; you can also use the
makeStringDefinition.pl tool in the scripts folder to generate the C++ snippet.
-or-
During my initialize wrapper, do a whole lot of transpose calls, which
equivalent release calls during my shutdown wrapper.
This option should be taken only if the string content is dynamically
generated.
Hope this helps,
Alberto
Of course if the above confirmation was false, then I have a third
option which is much easier to implement.
Anyways, confirmation of the above, and any decent options I might have
missed, would be appreciated.
Thanks,
Dale Pennington