Re: Character data
Carlos Pereira <[email protected]> Mon, 07 Feb 2011 23:09:22 +0000
| Newsgroups | gmane.text.xml.expat.general |
|---|---|
| Message-ID | <[email protected]> |
On 02/07/11 21:10, Robert Bielik wrote:
> Carlos Pereira skrev 2011-02-07 22:32:
>>
>> so I could see that 45 and 67i belong to the same number. However,
>> this seems a bit ugly... what about XML formats that may include
>> large blocks of numerical data (for example X3D...)?? is there a
>> better solution? what am I missing here?
>
> Just append the character data during parsing, so that at first call
> the chardata string is:
That's good advice, thanks. In some cases these data blocks may well
contain thousands of double or int values, so I am trying to parse and
save them to final arrays as soon as possible.
my mistake is I am removing (\t\n ) delimiters, before properly parsing
this.
Thanks a lot for clarifying this for me!
Carlos
>
> chData = "1234 45"
>
> then after next char data callback it is:
>
> chData = "1234 4567 891011"
>
> then you process the chData string in your endElement ("foo") handler.
>
> Regards,
> /Rob
> _______________________________________________
> Expat-discuss mailing list
> [email protected]
> http://mail.libexpat.org/mailman/listinfo/expat-discuss
>