Character data
Carlos Pereira <[email protected]> Mon, 07 Feb 2011 21:32:36 +0000
| Newsgroups | gmane.text.xml.expat.general |
|---|---|
| Message-ID | <[email protected]> |
Hi, data that looks like this in a XML file: <foo> 1234 4567 891011 </foo> is sometimes passed through a character data callback as this: 1234 45 and then in a second call: 67 891011 As this integer data has no fixed size, there seems to be no obvious way to know whether the XML file contained these 3 numbers: 1234 4567 891011 or these these 4 numbers: 1234 45 67 891011 The only way I see to go around this issue is to add some special character (a i in this example), to mark where each number actually ends, for example: 1234i 4567i 891011i could be passed in the callback as: 1234i 45 and then in another call: 67i 891011i 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? Thanks a lot for your help! Carlos Pereira