Main Page   Class Hierarchy   Compound List   File List   Compound Members  

XMLRecognizer Class Reference

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 [] = { 0x3C, 0x3F, 0x78, 0x6D, 0x6C, 0x20 }
const unsigned int fgASCIIPreLen = 6
const XMLByte fgEBCDICPre [] = { 0x4C, 0x6F, 0xA7, 0x94, 0x93, 0x40 }
const unsigned int fgEBCDICPreLen = 6
const XMLByte fgUTF16BPre [] = { 0x00, 0x3C, 0x00, 0x3F, 0x00, 0x78, 0x00, 0x6D, 0x00, 0x6C, 0x00, 0x20 }
const XMLByte fgUTF16LPre [] = { 0x3C, 0x00, 0x3F, 0x00, 0x78, 0x00, 0x6D, 0x00, 0x6C, 0x00, 0x20, 0x00 }
const unsigned int fgUTF16PreLen = 12
const XMLByte fgUCS4BPre []
const XMLByte fgUCS4LPre []
const unsigned int fgUCS4PreLen = 24
const char fgUTF8BOM [] = {(char)0xEF, (char)0xBB, (char)0xBF}
const unsigned int fgUTF8BOMLen = 3

Protected Methods

void operator= (const XMLRecognizer &)

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 Data Documentation

const XMLByte XMLRecognizer::fgUCS4BPre [static]
 

Initial value:

{
        0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x3F
    ,   0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x6D
    ,   0x00, 0x00, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x20
}

const XMLByte XMLRecognizer::fgUCS4LPre [static]
 

Initial value:

{
        0x3C, 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00
    ,   0x78, 0x00, 0x00, 0x00, 0x6D, 0x00, 0x00, 0x00
    ,   0x6C, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00
}


The documentation for this class was generated from the following files:
Generated on Tue Nov 19 09:36:48 2002 by doxygen1.3-rc1