GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > XLX / V9-0-0

Constituent: parser     Tag: linux-gcc


Interface   Data Structures   File List   Data Fields   Globals  

state.c File Reference

Change of state on entering and leaving an element. More...

#include "XLX_p.h"
#include "EXPAT/expat.h"
#include "stdlib.h"
#include "stdio.h"
#include "string.h"

Include dependency graph for state.c:


Functions

unsigned XLX_initState (XLX_state *state, unsigned stackLimit, void *stackSeed, XLX_pDoctype doctype, XLX_pEnter enter, XLX_pExit exit, XLX_pChar character, int verbose)
 Initialise the state of the parser.
void XLX_doctype (void *data, const char *name, const char *sysId, const char *pubId, int intSubset)
 Handle a doctype declaration.
void XLX_start (void *data, const char *element, const char **attribute)
 Handle a start tag.
void XLX_end (void *data, const char *element)
 Handle an end tag.
void XLX_character (void *data, const char *element, int len)
 Handle a character element.
void XLX_printout_down (XLX_state *state, const char *element)
 Print a starting tag.
void XLX_printout_up (XLX_state *state, const char *element)
 Print an ending tag.
void XLX_character_noop (XLX_state *state, const char *element, int len)
 No-op character element handler.
void XLX_enter_noop (XLX_state *state, const char **attribute)
 No-op enter element handler.
void XLX_exit_noop (XLX_state *state)
 No-op exit element handler.
void XLX_character_tag (XLX_state *state, const char *element, int len)
 Handle a character element inside a parent tag by delegating the work to the first child.

Detailed Description

Change of state on entering and leaving an element.

Author:
James Swain & Owen Saxton
Id
state.c,v 1.14 2006/07/29 00:03:17 saxton Exp

Function Documentation

void XLX_character void *  data,
const char *  element,
int  len
 

Handle a character element.

Parameters:
data Pointer to the current state of the parser
element Character element
len Length of the character element

void XLX_character_noop XLX_state state,
const char *  element,
int  len
 

No-op character element handler.

Parameters:
state Pointer to the current state of the parser
element The text string from the current element
len Length of element

void XLX_character_tag XLX_state state,
const char *  element,
int  len
 

Handle a character element inside a parent tag by delegating the work to the first child.

If there are valid characters in the character element then the first child of the current tag is pushed onto the stack and then XLX_character is called to handle the character parsing. After the parsing is complete the child is popped off the stack.

Parameters:
state Pointer to the current state of the parser
element Character element
len Length of the character element

void XLX_doctype void *  data,
const char *  name,
const char *  sysId,
const char *  pubId,
int  intSubset
 

Handle a doctype declaration.

Parameters:
data Pointer to the current state of the parser
name The doctype name
sysId The system ID name
pubId The public ID name
intSubset True if internal subset

void XLX_end void *  data,
const char *  element
 

Handle an end tag.

Parameters:
data Pointer to the current state of the parser
element Element name from end tag

void XLX_enter_noop XLX_state state,
const char **  attribute
 

No-op enter element handler.

Parameters:
state Pointer to the current state of the parser
attribute Attribute list for the current element

void XLX_exit_noop XLX_state state  ) 
 

No-op exit element handler.

Parameters:
state Pointer to the current state of the parser

unsigned XLX_initState XLX_state state,
unsigned  stackLimit,
void *  stackSeed,
XLX_pDoctype  doctype,
XLX_pEnter  enter,
XLX_pExit  exit,
XLX_pChar  character,
int  verbose
 

Initialise the state of the parser.

Parameters:
state Pointer to the state information
stackLimit Initial depth of the stack
stackSeed Initial item on the stack
doctype Action on encountering a doctype declaration
enter Parser default action on encountering an enter tag
exit Parser default action on encountering an exit tag
character Parser default action on encountering a character tag
verbose Verbosity level of the parser: 0 is quiet, non-zero is not
Return values:
0 Success
-1 Insufficient memory

void XLX_printout_down XLX_state state,
const char *  element
 

Print a starting tag.

Parameters:
state Pointer to the current state of the parser
element Text string from the current tag

void XLX_printout_up XLX_state state,
const char *  element
 

Print an ending tag.

Parameters:
state Pointer to the current state of the parser
element Text string from the current tag

void XLX_start void *  data,
const char *  element,
const char **  attribute
 

Handle a start tag.

Parameters:
data Pointer to the current state of the parser
element Element name from start tag
attribute Attribute list from the start tag


Generated on Mon Jul 31 20:39:58 2006 by  doxygen 1.4.4