Edinburgh Speech Tools  2.1-release
xmlparser.h File Reference
#include "dtd.h"
#include "input.h"
Include dependency graph for xmlparser.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Attribute
 
struct  ContentParticle
 
struct  XBit
 
struct  element_info
 
struct  Parser
 

Macros

#define pcdata_chars   S1
 
#define pi_name   S1
 
#define pi_chars   S2
 
#define comment_chars   S1
 
#define cdsect_chars   S1
 
#define xml_version   s1
 
#define xml_encoding_name   s2
 
#define xml_standalone   i1
 
#define xml_encoding   i2
 
#define error_message   s1
 
#define ParserGetFlag(p, flag)   ((p)->flags & (1 << (flag)))
 

Typedefs

typedef void CallbackProc(XBit bit, void *arg)
 
typedef InputSource EntityOpenerProc(Entity e, void *arg)
 
typedef enum xbit_type XBitType
 
typedef enum cp_type CPType
 
typedef enum parser_flag ParserFlag
 

Enumerations

enum  xbit_type {
  XBIT_dtd, XBIT_start, XBIT_empty, XBIT_end,
  XBIT_eof, XBIT_pcdata, XBIT_pi, XBIT_comment,
  XBIT_cdsect, XBIT_xml, XBIT_error, XBIT_warning,
  XBIT_none, XBIT_enum_count
}
 
enum  cp_type { CP_pcdata, CP_name, CP_seq, CP_choice }
 
enum  parser_flag {
  ExpandCharacterEntities, ExpandGeneralEntities, XMLPiEnd, XMLEmptyTagEnd,
  XMLPredefinedEntities, ErrorOnUnquotedAttributeValues, NormaliseAttributeValues, NormalizeAttributeValues,
  ErrorOnBadCharacterEntities, ErrorOnUndefinedEntities, ReturnComments, CaseInsensitive,
  ErrorOnUndefinedElements, WarnOnUndefinedElements, ErrorOnUndefinedAttributes, WarnOnUndefinedAttributes,
  WarnOnRedefinitions, TrustSDD, XMLExternalIDs, ReturnDefaultedAttributes,
  MergePCData, XMLMiscWFErrors, XMLStrictWFErrors, AllowMultipleElements,
  CheckEndTagsMatch, IgnoreEntities, XMLLessThan
}
 
enum  parse_state {
  PS_prolog1, PS_prolog2, PS_body, PS_epilog,
  PS_end, PS_error
}
 

Functions

XML_API int ParserInit (void)
 
XML_API Parser NewParser (void)
 
XML_API void FreeParser (Parser p)
 
XML_API Entity ParserRootEntity (Parser p)
 
XML_API InputSource ParserRootSource (Parser p)
 
XML_API XBit ReadXBit (Parser p)
 
XML_API XBit PeekXBit (Parser p)
 
XML_API void FreeXBit (XBit xbit)
 
XBit ReadXTree (Parser p)
 
void FreeXTree (XBit tree)
 
XML_API XBit ParseDtd (Parser p, Entity e)
 
XML_API void ParserSetWarningCallback (Parser p, CallbackProc cb)
 
XML_API void ParserSetDtdCallback (Parser p, CallbackProc cb)
 
XML_API void ParserSetEntityOpener (Parser p, EntityOpenerProc opener)
 
XML_API void ParserSetCallbackArg (Parser p, void *arg)
 
XML_API int ParserPush (Parser p, InputSource source)
 
XML_API void ParserPop (Parser p)
 
XML_API void ParserSetFlag (Parser p, ParserFlag flag, int value)
 
XML_API void ParserPerror (Parser p, XBit bit)
 

Variables

XML_API const char8XBitTypeName [XBIT_enum_count]
 

Macro Definition Documentation

#define pcdata_chars   S1

Definition at line 81 of file xmlparser.h.

#define pi_name   S1

Definition at line 83 of file xmlparser.h.

#define pi_chars   S2

Definition at line 84 of file xmlparser.h.

#define comment_chars   S1

Definition at line 86 of file xmlparser.h.

#define cdsect_chars   S1

Definition at line 88 of file xmlparser.h.

#define xml_version   s1

Definition at line 90 of file xmlparser.h.

#define xml_encoding_name   s2

Definition at line 91 of file xmlparser.h.

#define xml_standalone   i1

Definition at line 92 of file xmlparser.h.

#define xml_encoding   i2

Definition at line 93 of file xmlparser.h.

#define error_message   s1

Definition at line 95 of file xmlparser.h.

#define ParserGetFlag (   p,
  flag 
)    ((p)->flags & (1 << (flag)))

Definition at line 190 of file xmlparser.h.

Typedef Documentation

typedef void CallbackProc(XBit bit, void *arg)

Definition at line 29 of file xmlparser.h.

typedef InputSource EntityOpenerProc(Entity e, void *arg)

Definition at line 30 of file xmlparser.h.

typedef enum xbit_type XBitType

Definition at line 41 of file xmlparser.h.

typedef enum cp_type CPType

Definition at line 55 of file xmlparser.h.

typedef enum parser_flag ParserFlag

Definition at line 128 of file xmlparser.h.

Enumeration Type Documentation

enum xbit_type
Enumerator
XBIT_dtd 
XBIT_start 
XBIT_empty 
XBIT_end 
XBIT_eof 
XBIT_pcdata 
XBIT_pi 
XBIT_comment 
XBIT_cdsect 
XBIT_xml 
XBIT_error 
XBIT_warning 
XBIT_none 
XBIT_enum_count 

Definition at line 34 of file xmlparser.h.

enum cp_type
Enumerator
CP_pcdata 
CP_name 
CP_seq 
CP_choice 

Definition at line 52 of file xmlparser.h.

Enumerator
ExpandCharacterEntities 
ExpandGeneralEntities 
XMLPiEnd 
XMLEmptyTagEnd 
XMLPredefinedEntities 
ErrorOnUnquotedAttributeValues 
NormaliseAttributeValues 
NormalizeAttributeValues 
ErrorOnBadCharacterEntities 
ErrorOnUndefinedEntities 
ReturnComments 
CaseInsensitive 
ErrorOnUndefinedElements 
WarnOnUndefinedElements 
ErrorOnUndefinedAttributes 
WarnOnUndefinedAttributes 
WarnOnRedefinitions 
TrustSDD 
XMLExternalIDs 
ReturnDefaultedAttributes 
MergePCData 
XMLMiscWFErrors 
XMLStrictWFErrors 
AllowMultipleElements 
CheckEndTagsMatch 
IgnoreEntities 
XMLLessThan 

Definition at line 99 of file xmlparser.h.

Enumerator
PS_prolog1 
PS_prolog2 
PS_body 
PS_epilog 
PS_end 
PS_error 

Definition at line 132 of file xmlparser.h.

Function Documentation

XML_API int ParserInit ( void  )

Definition at line 137 of file xmlparser.c.

XML_API Parser NewParser ( void  )

Definition at line 432 of file xmlparser.c.

XML_API void FreeParser ( Parser  p)

Definition at line 488 of file xmlparser.c.

XML_API Entity ParserRootEntity ( Parser  p)

Definition at line 508 of file xmlparser.c.

XML_API InputSource ParserRootSource ( Parser  p)

Definition at line 498 of file xmlparser.c.

XML_API XBit ReadXBit ( Parser  p)

Definition at line 633 of file xmlparser.c.

XML_API XBit PeekXBit ( Parser  p)

Definition at line 643 of file xmlparser.c.

XML_API void FreeXBit ( XBit  xbit)

Definition at line 300 of file xmlparser.c.

XBit ReadXTree ( Parser  p)

Definition at line 535 of file xmlparser.c.

void FreeXTree ( XBit  tree)

Definition at line 613 of file xmlparser.c.

XML_API XBit ParseDtd ( Parser  p,
Entity  e 
)

Definition at line 1986 of file xmlparser.c.

XML_API void ParserSetWarningCallback ( Parser  p,
CallbackProc  cb 
)

Definition at line 523 of file xmlparser.c.

XML_API void ParserSetDtdCallback ( Parser  p,
CallbackProc  cb 
)

Definition at line 518 of file xmlparser.c.

XML_API void ParserSetEntityOpener ( Parser  p,
EntityOpenerProc  opener 
)

Definition at line 528 of file xmlparser.c.

XML_API void ParserSetCallbackArg ( Parser  p,
void *  arg 
)

Definition at line 513 of file xmlparser.c.

XML_API int ParserPush ( Parser  p,
InputSource  source 
)

Definition at line 656 of file xmlparser.c.

XML_API void ParserPop ( Parser  p)

Definition at line 711 of file xmlparser.c.

XML_API void ParserSetFlag ( Parser  p,
ParserFlag  flag,
int  value 
)

Definition at line 756 of file xmlparser.c.

XML_API void ParserPerror ( Parser  p,
XBit  bit 
)

Definition at line 772 of file xmlparser.c.

Variable Documentation

XML_API const char8* XBitTypeName[XBIT_enum_count]

Definition at line 118 of file xmlparser.c.