fAttrValue is at list of 2-byte characters.  If you are using some kind
of iso-latin charset, then every second byte position will hold '\0'. Therefore
printf will show only the first char.

Use XMLTranscode to convert 2-byte chars to an iso char string.

/cb 

-----Original Message-----
From: Markku Pirila [mailto:[EMAIL PROTECTED]]
Sent: 13. juni 2002 14:02
To: [EMAIL PROTECTED]
Subject: RE: getting attribute values




#> -----Original Message-----
#> From: Tinny Ng [mailto:[EMAIL PROTECTED]]
#> Sent: Wednesday, June 12, 2002 5:05 PM
#> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
#> Subject: Re: getting attribute values
#>
#>
#> PParse is using SAX parser.   So I assume you are using SAX.  So I would
#> recommend SAXPrint which is a relatively simple sample and shows
#> you how to
#> get attribute values while parsing an XML file.
#>
#> Tinny


Despite of recommendation of senior programmers I have continued playing
with PParse. I think I'm quite close to solution but still facing questions.


Why the following code prints just the first letter of the string?

        fAttrValue = attributes.getValue(i);

        if (fAttrValue != NULL )
        {
                printf("%s",fAttrValue);
        }



How can I get the whole string?

What about if the length of attributes value changes?

Markku




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to