I'm still unable to sucessfully preserve the whitespace witin my XML 
document!

MSXML has a flag called preserveWhiteSpace that when set tells the XML 
parser NOT to strip space characters and reduce reduce the file to the 
smallest possible stream.  Does Xerces have any functionality similar to 
this ??

Obviously the problem lies when the parser reads the document into memory 
as it is at this point that non essential white space is removed, but I am 
unable to find any solutions to this VERY annoying problem!!

Many thanks

Neil

On 18 December 2001 15:44, Neil Sherman [SMTP:[EMAIL PROTECTED]] wrote:
> So is it actually possible to force Xerces into just leaving the white
> space as it is??
>
> I have an attribute value that has three spaces at the beginning, and 
when
> I read it back in the white space has been removed.  This makes it very
> difficult to compare against another value as they no longer match!!
>
> I have tried specifying that it preserve whitespace but it doesn't seem 
to
> have any effect!!
>
> i.e.
>
>        <xsd:attribute name="AimStopPointCode" xsd:type="xsd:string"
> default="preserve">
>
> I've also tried setting the attribute type to CDATA but that too has no
> effect.
>
> Is there an easy solution to this problem??
>
> Many thanks
>
> Neil
>
> On 16 December 2001 04:23, Dean Roddey [SMTP:[EMAIL PROTECTED]]
> wrote:
> > Yeh, that's true. Normalization is done at the low character spooling
> level,
> > so its done always really. The only time its not done at that level is
> when
> > what's being spooled is an internal entity, which has already been
> > normalized during its initial parse, so one way or another the
> normalization
> > is always done.
> >
> > I guess I was just trying to make sure he understand that CDATA means 
two
> > different things, since he seemed to be thinking that. I just picked a
> > really bad example to try to point it out :-)
> >
> > --------------------------
> > Dean Roddey
> > The Charmed Quark Controller
> > Charmed Quark Software
> > [EMAIL PROTECTED]
> > http://www.charmedquark.com
> >
> > "If it don't have a control port, don't buy it!"
> >
> >
> > ----- Original Message -----
> > From: "Hal DeVore" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, December 15, 2001 6:40 PM
> > Subject: Re: Reading attribute values with leading spaces
> >
> >
> > >
> > > >>>>> On Sat, 15 Dec 2001, "Dean" == Dean Roddey wrote:
> > >
> > >   Dean> not imply the same thing that a *CDATA Section* means in
> > >   Dean> the body of an XML document, which means "don't be messin
> > >   Dean> with my stuff".
> > >
> > > My understanding is that whitespace normalization
> > > happens even in CDATA _sections_.
> > >
> > >
> > > --Hal
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to