Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Optimizing character checking

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: John Cowan <cowan AT mercury.ccil.org>
  • To: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Optimizing character checking
  • Date: Mon, 12 May 2003 08:35:02 -0400

Elliotte Rusty Harold scripsit:

> private static boolean isXMLCharacter(int c) {
>
> if (c <= 0xD7FF) {
> if (c >= 0x20) return true;
> else {
> if (c == '\n') return true;
> if (c == '\r') return true;
> if (c == '\t') return true;
> return false;
> }
> }

I recommend creating a static boolean array to handle the characters less
than 0x20.

--
John Cowan jcowan AT reutershealth.com
"You need a change: try Canada" "You need a change: try China"
--fortune cookies opened by a couple that I know




Archive powered by MHonArc 2.6.24.

Top of Page