[Expat-discuss] characterData

Mark Williams Mark.Williams at techop.co.uk
Fri Jul 20 10:45:56 CEST 2007


> On 7/20/07, Gert Cuykens <gert.cuykens at gmail.com> wrote:
> > On 7/20/07, Sebastian Pipping <webmaster at hartwork.org> wrote:
> > > You don't handle the case yet that the character handler
> > > is called multiple times for a single node.
> > > The node
> > >
> > >   <example>one two three</example>
> > >
> > > can actually be passed to the handler as
> > >
> > >   "one tw"
> > > > and
> > >
> > >   "o three"
> > >
> > > or similar. You have to do concatenation yourself.
> >
> > hmm yes you are right need to make a drawing for that, but first i
> > want to find out why my xml post to apache2 doest come 
> trough. I only
> > get the first line. Probably has to do with stdin and \n 
> characters or
> > something.
> >
> 
> if i am not mistaken in this version
> 
> http://dfo.svn.sourceforge.net/viewvc/dfo/trunk/cgi/xml.c?view=markup
> 
> i only get ++++ when i write a tag inside a other tag like for example
> <tag>-----<tag>++++</tag>----</tag>
> 
> For now that will just do fine for my application. I like to keep it
> as simple as possible i am not that smart. I will make a start tag
> init later.

You also have a memory leak in this code.  You can check for empty
elements just by checking if page->data == NULL in your end element
handler.

Mark


More information about the Expat-discuss mailing list