|
I used to store the transcoded string into a string
variable, (char array).
And then I define my own trim function on C++,
so your code may look like this:
main
{
char foo[BUF_SIZE];
strcpy(foo,
textNode.getNodeValue().transcode());
trim (foo);
}
Where the trim function may be like:
char* trim(char* source){
int i,j;
i = strlen(source)-1; // trim the right side while
((i>=0)&&(source[i]==' ')){
i--; } source[i+1]='\0';
//trim the left
side
i =
strlen(source);
j = 0;
while( (j<i-1)&&(source[j]==' ')){ j++; } return
(source+j);
}
Regards.
Jorge.
Jorge Pozo Ram�rez Accenture - Spain Technology Consulting Services Government GMU email: [EMAIL PROTECTED] ------------------------------------------------------------ Subdirecci�n General de Inform�tica - Ministerio de Justicia - Madrid, Espa�a email: [EMAIL PROTECTED] Tel:9 13902646 ----- Original Message -----
|
- Handling "white space" in element value Shirish M. Kulkarni
- Re: Handling "white space" in element v... Jorge Pozo Ramirez
- Re: Handling "white space" in eleme... Jorge Pozo Ramirez
- Re: Handling "white space" in e... Jorge Pozo Ramirez
- Re: Handling "white space" in eleme... Stefan Voelkel
- Re: Handling "white space" in e... Jorge Pozo Ramirez
- Re: Handling "white space" ... Stefan Voelkel
- Fw: Handling "white space" in element v... Jorge Pozo Ramirez
- Re: Handling "white space" in element v... Rajesh Kommineni
