[Expat-discuss] whitespace trouble

Allen, Michael B (RSCH) Michael_B_Allen@ml.com
Mon, 27 Aug 2001 21:53:16 -0400


You're welcome. Ironically this is a peice of code that should be taken out of DOMC because it assumes the user does not need it. But that's my problem.

Later,
Mike

> -----Original Message-----
> From:	Glen Hein [SMTP:ghein@thisisa.com]
> Sent:	Monday, August 27, 2001 9:51 PM
> To:	Allen, Michael B (RSCH)
> Cc:	'Glen Hein'; expat-discuss@lists.sourceforge.net
> Subject:	RE: [Expat-discuss] whitespace trouble
> 
> 
> I'd like to thank you from the bottom of my keyboard :-)
> 
> I examined the fundamental differences between my 
> CharacterDataHandler and the version you cited.  All I had
> to do was to have my handler skip the whitespace:
> 
> for (i = 0; i < len && !isgraph(s[i]); i++) {
>   ;
> }
> if (i == len) {
>   return;
> }
> 
> -Glen Hein
> 
> Quoting "Allen, Michael B (RSCH)" <Michael_B_Allen@ml.com>:
> 
> > Be very carefull about the code in your CharacterDataHandler
> > function. The strings passed to it are NOT null terminated and
> > may not be all of the text (may be broken into adjacent
> > peices). This is a great place for an error. See how DOMC
> > handles it in the chardata_fn when building the DOM tree here:
> > 
> > http://auditorymodels.org/domc/src/lib/expatls.c
> > 
> > Mike
> > > -----Original Message-----
> > > From:	Glen Hein [SMTP:ghein@thisisa.com]
> > > Sent:	Monday, August 27, 2001 7:03 PM
> > > To:	expat-discuss@lists.sourceforge.net
> > > Subject:	[Expat-discuss] whitespace trouble
> > > 
> > > 
> > > Hello Everybody!
> > > 
> > > I'm new to expat and I recently adopted a project that was
> > > using expat.  Unfortunately, I do not have contact with the
> > > orginal programmer.  
> > > 
> > > I've having a problem with whitespace in the xml structure that
> > > is to be parsed.  It appears that any whitespace bewtween the 
> > > xml tags casuse the parser to fail.  
> > > 
> > > I have not yet determined if the problem is in expat or in the
> > > overall application.  
> > > 
> > > Is there a known problem with whitespace?  Is there a particular
> > > area of expat that I should be looking at?  Is whitespace an
> > > option in expat?
> > > 
> > > Thanks,
> > > Glen Hein
> > > ghein@thisisa.com
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > Expat-discuss mailing list
> > > Expat-discuss@lists.sourceforge.net
> > > http://lists.sourceforge.net/lists/listinfo/expat-discuss
> >