[Expat-discuss] CharacterDataHandler question. (re-post)
Mauro Daniel Ardolino
mauro@altersoft.com.ar
Mon, 23 Sep 2002 10:05:12 -0400 (ART)
Sorry if this message arrived twice. I'm not having echo of the first
post. It could not arrived.
The message:
Hello!
I red the documentation about the CharacterDataHandler and I think
this event is called when there's data inside tags. I'm using the C++
Wrapper written by Tim Smith.
The fact is that I'm testing it and I discovered that this handler is
called even if there's no data inside tags.
e.g.:
<A></A>
It is called twice and the data is first a CR and then a white space.
On the other hand I know that this handler can be called more than once
for the same tag bringing pieces of information (why is that?).
What I cannot solve is differencing between a valid white space and this
strange spureous white space.
e.g.
<A>THIS HAS THREE SPACES</A>
My first idea:
On start element: init a variable.
On character: save adding on the variable.
On end element: take off the CR and the last white space.
Do I have to do all that work?
If so I think I can write a subclass from Tim's one to do it only once.
Am I wrong?
Thanks a lot.
-- Mauro
--
Ing.Mauro Daniel Ardolino
Departamento de Desarrollo y Servicios
Altersoft
Billinghurst 1599 - Piso 9
C1425DTE - Capital Federal
Tel/Fax: 4821-3376 / 4822-8759
mailto: mauro@altersoft.com.ar
website: http://www.altersoft.com.ar