Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] More parsing performance patches

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Harold <elharo AT metalab.unc.edu>
  • To: Wolfgang Hoschek <whoschek AT lbl.gov>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] More parsing performance patches
  • Date: Sat, 23 Jul 2005 07:20:58 -0400

Wolfgang Hoschek wrote:

Do you really need the carriage returns here? The XML parser is going to normalize all carriage returns and carriage return/ linefeed pairs in the input document to linefeeds when parsing. A carriage return is only gong to appear if the user has used a numeric character reference to specially insert a carriage return. That does happen but it's quite uncommon. I

It doesn't hurt to play it safe. Parser behaviour may unexpectedly change.


In this case the parser behavior is not going to change unless the XML spec changes, which doesn't seem very likely. Converting carriage returns to line feeds is a written into the spec. A parser that failed to do this would be non-conformant.


--
Elliotte Rusty Harold elharo AT metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim




Archive powered by MHonArc 2.6.24.

Top of Page