http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Installation
Build

API Docs
Samples
Programming
Migration
FAQs

Releases
Feedback

PDF Document

Download
Dev Snapshots
CVS Repository
Mail Archive

API Docs for SAX and DOM
 

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XMLRecognizer Class Reference

This class provides some simple code to recognize the encodings of XML files. More...

#include <XMLRecognizer.hpp>

List of all members.

Public Types

enum  Encodings {
  EBCDIC = 0,
  UCS_4B = 1,
  UCS_4L = 2,
  US_ASCII = 3,
  UTF_8 = 4,
  UTF_16B = 5,
  UTF_16L = 6,
  Encodings_Count,
  Encodings_Min = EBCDIC,
  Encodings_Max = UTF_16L,
  OtherEncoding = 999,
  Def_UTF16 = UTF_16L,
  Def_UCS4 = UCS_4L
}

Static Public Methods

Encodings basicEncodingProbe ( const XMLByte* const rawBuffer , const unsigned int rawByteCount )
Encodings encodingForName ( const XMLCh* const theEncName )
const XMLCh* nameForEncoding (const Encodings theEncoding)

Static Public Attributes

const char fgASCIIPre []
const unsigned int fgASCIIPreLen
const XMLByte fgEBCDICPre []
const unsigned int fgEBCDICPreLen
const XMLByte fgUTF16BPre []
const XMLByte fgUTF16LPre []
const unsigned int fgUTF16PreLen
const XMLByte fgUCS4BPre []
const XMLByte fgUCS4LPre []
const unsigned int fgUCS4PreLen


Detailed Description

This class provides some simple code to recognize the encodings of XML files.

This recognition only does very basic sensing of the encoding in a broad sense. Basically its just enough to let us get started and read the XMLDecl line. The scanner, once it reads the XMLDecl, will tell the reader any actual encoding string it found and the reader can update itself to be more specific at that point.


Member Enumeration Documentation

enum XMLRecognizer::Encodings

Enumeration values:
EBCDIC  
UCS_4B  
UCS_4L  
US_ASCII  
UTF_8  
UTF_16B  
UTF_16L  
Encodings_Count  
Encodings_Min  
Encodings_Max  
OtherEncoding  
Def_UTF16  
Def_UCS4  

Member Function Documentation

Encodings XMLRecognizer::basicEncodingProbe ( const XMLByte * const rawBuffer,
const unsigned int rawByteCount ) [static]

Encodings XMLRecognizer::encodingForName ( const XMLCh * const theEncName ) [static]

const XMLCh* XMLRecognizer::nameForEncoding ( const Encodings theEncoding ) [static]


Member Data Documentation

const char XMLRecognizer::fgASCIIPre[] [static]

const unsigned int XMLRecognizer::fgASCIIPreLen [static]

const XMLByte XMLRecognizer::fgEBCDICPre[] [static]

const unsigned int XMLRecognizer::fgEBCDICPreLen [static]

const XMLByte XMLRecognizer::fgUCS4BPre[] [static]

const XMLByte XMLRecognizer::fgUCS4LPre[] [static]

const unsigned int XMLRecognizer::fgUCS4PreLen [static]

const XMLByte XMLRecognizer::fgUTF16BPre[] [static]

const XMLByte XMLRecognizer::fgUTF16LPre[] [static]

const unsigned int XMLRecognizer::fgUTF16PreLen [static]


The documentation for this class was generated from the following file:


Copyright © 2000 The Apache Software Foundation. All Rights Reserved.