xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Atul Paradkar" <atul_parad...@hotmail.com>
Subject RE: Ignoring white space
Date Tue, 31 Oct 2000 17:18:03 GMT
I am sorry, I should have said customize the character() method.

Here is the code attached from the same tutorial for non-validating parser.  
Hope it helps.

Make the changes shown below to suppress output of characters that are all 
whitespace:

    public void characters (char buf [], int offset, int len)
    throws SAXException
    {

        nl(); emit ("CHARS:   ");
        String s = new String(buf, offset, len);
        if (!s.trim().equals("")) emit (s);
    }




>From: "Atul Paradkar" <atul_paradkar@hotmail.com>
>Reply-To: general@xml.apache.org
>To: general@xml.apache.org
>Subject: RE: Ignoring white space
>Date: Tue, 31 Oct 2000 17:01:12 GMT
>
>You may have to write your own nl() method to ignore white spaces as done 
>in
>the tutorial referenced below.
>
>Atul
>
>
>>From: Vincent Finn <V.Finn@mvt.ie>
>>Reply-To: general@xml.apache.org
>>To: "'general@xml.apache.org'" <general@xml.apache.org>
>>Subject: RE: Ignoring white space
>>Date: Tue, 31 Oct 2000 10:14:03 -0000
>>
>>Unfortunately I'm using the DOM rather than SAX
>>and I don't have a DTD which is why my parser
>>has to be non-validating
>>
>>	Vin
>>
>>------------------------------------------------------------------------
>>vfinn@mvt.ie
>>------------------------------------------------------------------------
>>If something has to go down on me
>>Why does it have to be my computer?
>>------------------------------------------------------------------------
>>
>> > -----Original Message-----
>> > From:	Yi Ting Ong [SMTP:oyting@yahoo.com]
>> > Sent:	Friday, October 27, 2000 10:24 AM
>> > To:	general@xml.apache.org
>> > Subject:	Re: Ignoring white space
>> >
>> >
>> > HI,go to
>> >
>> > java.sun.com/xml/docs/tutorial/sax/5b_dtd.html#ignorable
>> >
>> > Regards,
>> > Christine ONG
>> >
>> > --- Vincent Finn <V.Finn@mvt.ie> wrote:
>> > > Hi,
>> > >
>> > > I am using a non validating parser and I want to
>> > > ignore
>> > > white space between tags
>> > >
>> > > is this possible ??
>> > >
>> > > the only functions I could find for this were
>> > > exclusively for validating
>> > > parsers
>> > >
>> > > 	Vin
>> > >
>> > >
>> > 
>>------------------------------------------------------------------------
>> > > vfinn@mvt.ie
>> > >
>> > 
>>------------------------------------------------------------------------
>> > > If something has to go down on me
>> > > Why does it have to be my computer?
>> > >
>> > 
>>------------------------------------------------------------------------
>> > >
>> > >
>> > >
>> > ---------------------------------------------------------------------
>> > > In case of troubles, e-mail:
>> > > webmaster@xml.apache.org
>> > > To unsubscribe, e-mail:
>> > > general-unsubscribe@xml.apache.org
>> > > For additional commands, e-mail:
>> > > general-help@xml.apache.org
>> > >
>> >
>> >
>> > __________________________________________________
>> > Do You Yahoo!?
>> > Yahoo! Messenger - Talk while you surf!  It's FREE.
>> > http://im.yahoo.com/
>> >
>> > ---------------------------------------------------------------------
>> > In case of troubles, e-mail:     webmaster@xml.apache.org
>> > To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
>> > For additional commands, e-mail: general-help@xml.apache.org
>>
>>---------------------------------------------------------------------
>>In case of troubles, e-mail:     webmaster@xml.apache.org
>>To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
>>For additional commands, e-mail: general-help@xml.apache.org
>>
>
>_________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>Share information about yourself, create your own public profile at
>http://profiles.msn.com.
>
>
>---------------------------------------------------------------------
>In case of troubles, e-mail:     webmaster@xml.apache.org
>To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
>For additional commands, e-mail: general-help@xml.apache.org
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


Mime
View raw message