Title: RE: XalanDOMString

This is how I did it, not that it is the best or most efficient.

                                //convert XalanDOMString to CharVector...
                                CharVectorType  l_TempCharVector = TranscodeToLocalCodePage (l_XObject->str());

                                // convert the element data from CharVector to string...
                                char temp[256];
                                memset(temp,0,256);
                                int l_nVectorSize = 0;
                               
                                // This is necessary to protect ourselves from an errant
                                // xpath statement that returns too much data, or from
                                // a data variable that is longer than 255 being extracted from the XML
                                if (l_TempCharVector.size() > 255)
                                {
                                        l_nVectorSize = 255;                                                                   

                                }
                                else
                                {
                                        l_nVectorSize = l_TempCharVector.size();
                                }

                                for (int i=0; i<l_nVectorSize; i++)
                                {
                                        temp[i]=l_TempCharVector[i];
                                }
                                temp[i]=0;
                               
                                string l_sXMLParsingResultValue = temp;
Charles

Charles H. Karpinski, FLMI, ACS
Jackson National Life 
IT - New Business Systems


                                       


-----Original Message-----
From: Jason Jesso [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 06, 2004 2:13 PM
To: [email protected]
Subject: XalanDOMString


I'm no expert C++ programmer, yet.

I'm trying to get a C++ string from a XalanDOMString.

Can't seem to figure it out.

Can you help?

Reply via email to