OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Preserving white space and entity references in DataChannel XJP

[ Lists Home | Date Index | Thread Index ]
  • From: Vance Christiaanse <vance@textwise.com>
  • To: Erik James Freed <ejfreed@infocanvas.com>
  • Date: Tue, 27 Jul 1999 14:49:11 -0400

> Erik James Freed wrote:
> 
> I am experiencing some strange behavior with the datachannel XML
> parser package (the most recent one).
> In my reading of the DOM spec, this is not appropriate behavior, but
> perhaps I am missing something.
>
> The behavior is that when I do a 'setPreserveWhiteSpace(true)' before
> parsing a document, and the document
> contains strings with entity references such as:
> 
>     <element1> &lt; fubar &gt; </element1>
> 
> when I then do a getText() on element1, what is returned is a
> java.lang.String that contains a null (char 0) for each entity
> reference.
> 
> These nulls of course confound the rest of the code I am writing. In
> side the DOM tree the entity reference objects are happily holding the
> appropriate text representation  i.e. '<' and  '>'.
> 
> Turning off white space preservation makes the getText() place
> appropriate decoded entity references in the resulting string.
> 
> Bug or feature?
> 
> erik
> 
> 
> Erik James Freed
> InfoCanvas Software


I don't see a setPreserveWhiteSpace(...) method or preserveWhiteSpace
class or instance variable in the DOM spec and I don't see getText() or
a text variable either. The answer to "bug or feature" would be up to
the

> datachannel XML parser package

Vance

Vance Christiaanse
TextWise, LLC
vance@textwise.com

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS