[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    RE: Bug with setLoadStripWhitespace ? Or expected behaviour?
From:       "Cezar Andrei" <cezar () bea ! com>
Date:       2006-07-20 21:44:15
Message-ID: 99479F4D39C9244F8E17E688193A3DD8AE3696 () repbex02 ! amer ! bea ! com
[Download RAW message or body]

Just in with revision 424071.

> -----Original Message-----
> From: Cezar Andrei
> Sent: Thursday, July 20, 2006 4:03 PM
> To: dev@xmlbeans.apache.org
> Subject: RE: Bug with setLoadStripWhitespace ? Or expected behaviour?
> 
> I have a fix for this problem that I'll send as soon as the apache svn
> server is up.
> 
> Cezar
> 
> > -----Original Message-----
> > From: geastman@sympatico.ca [mailto:geastman@sympatico.ca]
> > Sent: Wednesday, July 19, 2006 7:51 PM
> > To: dev@xmlbeans.apache.org
> > Subject: Re: Bug with setLoadStripWhitespace ? Or expected
behaviour?
> >
> > To answer my own question, it looks like this is a known, open issue
> with
> > a suggested partial fix:
> >
> > http://issues.apache.org/jira/browse/XMLBEANS-274
> >
> > >
> > > From: <geastman@sympatico.ca>
> > > Date: 2006/07/19 Wed AM 10:44:10 EST
> > > To: <dev@xmlbeans.apache.org>
> > > Subject: Bug with setLoadStripWhitespace ? Or expected behaviour?
> > >
> > > In addition to stripping insignificant white space between element
> close
> > and open tags, the
> > setLoadStripWhitespace option will strip a space following an entity
> > reference.
> > >
> > > So something saved as "Proctor & Gamble" is read as "Proctor
> &Gamble".
> > >
> > > This looks like a bug to me. Anyone know if this behaviour is
> intended?
> > >
> > > Here is a snippet to illustrate the problem:
> > >
> > >         XmlObject test = XmlObject.Factory.parse("<company>Proctor
> &amp;
> > Gamble</company>");
> > >         System.out.println("test = " + test);
> > >         test.save(new File("test.xml"));
> > >         XmlObject test2 = XmlObject.Factory.parse(new
> File("test.xml"));
> > >         System.out.println("test2 = " + test2);
> > >         XmlOptions options = new
> XmlOptions().setLoadStripWhitespace();
> > >         XmlObject test3 = XmlObject.Factory.parse(new
> File("test.xml"),
> > options);
> > >         System.out.println("test3 = " + test3);
> > >
> > > produces this output:
> > >
> > > test = <company>Proctor &amp; Gamble</company>
> > > test2 = <company>Proctor &amp; Gamble</company>
> > > test3 = <company>Proctor &amp;Gamble</company>
> > >
> > > Cheers,
> > > Gord
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
> > > For additional commands, e-mail: dev-help@xmlbeans.apache.org
> > >
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
> > For additional commands, e-mail: dev-help@xmlbeans.apache.org
> 
>
_______________________________________________________________________
> Notice:  This email message, together with any attachments, may
contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and
affiliated
> entities,  that may be confidential,  proprietary,  copyrighted
and/or
> legally privileged, and is intended solely for the use of the
individual
> or entity named in this message. If you are not the intended
recipient,
> and have received this message in error, please immediately return
this
> by email and then delete it.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
> For additional commands, e-mail: dev-help@xmlbeans.apache.org

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: dev-help@xmlbeans.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic