44 #ifndef _SSIZE_T_DEFINED
46 #define _SSIZE_T_DEFINED
50 #include <sys/types.h>
57 #if defined __cplusplus
73 static char *
xData_getTraceback( statusMessageReporting *smr, xData_element *element );
74 static char *
xData_getTraceback2( statusMessageReporting *smr, xData_rootElement *parentRoot,
int n );
90 ssize_t count,
n =
sizeof(
buffer ) - 1;
92 xData_document *doc = NULL;
96 f = open( fileName, O_RDONLY );
99 smr_setMessageError( smr, NULL, __FILE__, __LINE__, xData_errFileError,
"could not open file %s", fileName ); }
101 while( ( count = read( f, buffer, n ) ) > 0 ) {
110 "read failed with errno = %d for %s", errno, fileName );
113 if( ( doc != NULL ) && ( !
smr_isOk( smr ) ) ) {
127 xData_document *doc = NULL;
148 if( ( doc = (xData_document*) xData_malloc2( smr,
sizeof( xData_document ), 1,
"xData_document" ) ) != NULL ) {
159 XML_Parser xmlParser;
161 doc->status = xData_statusParsing;
162 doc->error = xData_errNone;
164 doc->err = (XML_Error) 0;
167 doc->fileName = NULL;
168 doc->xDataTypeOk_userFunction = func;
169 doc->xDataTypeOk_userData =
userData;
173 if( xmlParser == NULL ) {
174 smr_setMessageError( smr, NULL, __FILE__, __LINE__, xData_errXML_ParserCreate,
"XML_ParserCreate failed" ); }
178 doc->currentRoot = &(doc->root);
189 if( doc->xmlParser ) {
193 if(
smr_isOk( smr ) && (
XML_Parse( doc->xmlParser, NULL, 0, 1 ) == XML_STATUS_ERROR ) ) {
194 doc->status = xData_statusError;
196 "status = %d\nXML_Error code = %d\nXML_ErrorString = %s\nerror line, column = %d, %d", xData_errXMLParser,
197 doc->err,
XML_ErrorString( doc->err ), doc->err_line, doc->err_column );
200 doc->xmlParser = NULL;
201 if( doc->status != xData_statusError ) doc->status = xData_statusCompleted;
214 doc->fileName = (
char*)
xData_free( smr, doc->fileName );
226 if( element == NULL )
return( NULL );
227 for( ; element != NULL; element = next ) {
228 next = element->next;
240 element->childrenRoot.children = (xData_element*)
xData_parseFreeElement( smr, element->childrenRoot.children );
241 if( ( !strcmp( element->name,
"xData" ) ) && ( element->xDataTypeInfo.release != NULL ) ) element->xDataTypeInfo.release( smr,
242 &(element->xDataTypeInfo) );
245 if( element->attributes.attributes )
xData_free( smr, element->attributes.attributes );
246 if( element->text.text )
xData_free( smr, element->text.text );
253 if( doc->status != xData_statusParsing )
return( doc->status );
254 if(
XML_Parse( doc->xmlParser, s, strlen( s ), 0 ) == XML_STATUS_ERROR )
return( -1 );
262 xData_document *doc = (xData_document *) userData;
273 xData_document *doc = (xData_document *) userData;
276 if( !strcmp( name,
"xData" ) ) {
277 xData_element *element = doc->currentRoot->parentRoot->currentChild;
278 xData_text *text = &(element->text);
280 if( !strcmp( value, xData_oned_x_ID ) ) {
282 else if( !strcmp( value, xData_twod_xy_ID ) ) {
284 else if( !strcmp( value, xData_twod_xindex_y_ID ) ) {
286 else if( !strcmp( value, xData_twod_xShared_yHistogram_ID ) ) {
288 else if( !strcmp( value, xData_matrix_ID ) ) {
292 if( doc->xDataTypeOk_userFunction != NULL ) {
293 if( doc->xDataTypeOk_userFunction( value, doc, doc->xDataTypeOk_userData ) ) status = 1;
296 "Unsupported xData type = %s", value );
298 if( ( status == 0 ) && (
smr_isOk( doc->smr ) ) ) status = element->xDataTypeInfo.toData( doc->smr, &(element->xDataTypeInfo),
299 &(element->attributes), text->text );
301 doc->currentRoot->currentChild = NULL;
302 doc->currentRoot = doc->currentRoot->parentRoot;
312 xData_document *doc = (xData_document*) userData;
313 xData_text *text = &(doc->currentRoot->parentRoot->currentChild->text);
314 int needSize = text->length + len + 1, l;
318 if( needSize < 8 ) needSize = 8;
320 if( needSize > (
int) text->allocated ) {
321 if( text->allocated != 0 ) {
322 l = ( 20 * text->allocated ) / 100;
323 if( l < 100 ) l = 100;
325 if( needSize < ( (
int) text->allocated + l ) ) needSize = text->allocated + l;
327 text->allocated = needSize;
329 text->text = (
char*) xData_realloc2( doc->smr, text->text, text->allocated,
"text" );
332 p = &(text->text[text->length]);
333 strncpy( p, s, len );
341 xData_element *parentElement,
int depth ) {
344 re->parentElement = parentElement;
345 re->parentRoot = NULL;
346 if( parentElement != NULL ) re->parentRoot = parentElement->parentRoot;
348 re->numberOfElements = 0;
350 re->currentChild = NULL;
368 xData_document *doc = parentRoot->xData_doc;
369 xData_element *element;
370 int i,
n, status = 1;
373 const char **pAttris;
378 element = (xData_element*) xData_malloc2( doc->smr,
sizeof( xData_element ), 1,
"xData_element" );
379 if( element == NULL )
return( 1 );
381 element->ordinal = parentRoot->numberOfElements;
383 element->accessed = 0;
384 element->parentRoot = parentRoot;
386 element->next = NULL;
388 if( ( element->name = (
char*) xData_malloc2( doc->smr, strlen( name ) + 1, 0,
"name" ) ) == NULL ) {
392 strcpy( element->name, name );
398 for( i = 0, lens = 0, pAttris = attris; *pAttris; i++, pAttris++ ) lens += strlen( *pAttris ) + 1;
400 element->attributes.size = n *
sizeof( xData_attribute ) + lens;
401 element->attributes.number =
n;
402 element->attributes.attributes = NULL;
404 if( element->attributes.size ) {
406 if( ( element->attributes.attributes = (xData_attribute*) xData_malloc2( doc->smr, element->attributes.size, 0,
"attributes") ) == NULL ) {
409 a = element->attributes.attributes;
410 p = (
char *) &(element->attributes.attributes[n]);
411 for( i = 0, pAttris = attris; ( i <
n ) && status; i++, a++, pAttris++ ) {
412 lens = strlen( *pAttris ) + 1;
414 strcpy( p, *pAttris );
417 lens = strlen( *pAttris ) + 1;
419 strcpy( p, *pAttris );
421 if( !strcmp(
"index", a->name ) ) {
423 element->index = strtoll( a->value, &e, 10 );
426 element->index = strtol( a->value, &e, 10 );
430 smr_setMessageError( doc->smr, smrUser, __FILE__, __LINE__, -1,
"could not convert index attribute = %s to integer", a->value );
437 xData_free( smr, element->attributes.attributes );
444 element->textOffset = 0;
446 if( parentRoot->parentElement != NULL ) element->textOffset = parentRoot->parentElement->text.length;
447 if( parentRoot->currentChild == NULL ) {
448 parentRoot->children = element; }
450 parentRoot->currentChild->next = element;
452 parentRoot->numberOfElements++;
453 parentRoot->currentChild = element;
454 doc->currentRoot = &(element->childrenRoot);
464 return( xData_errNone );
471 return( doc->status == xData_statusError );
484 item->parentElement = element;
486 if( item->element == NULL ) {
487 item->mode = xData_itemModeText;
488 if( element->text.length == 0 ) item->mode = xData_itemModeEnd; }
490 item->mode = xData_itemModeElement;
491 if( 0 < item->element->textOffset ) item->mode = xData_itemModeText;
493 item->textOffset = 0;
494 item->textLength = element->text.length;
495 if( item->element != NULL ) item->textLength = item->element->textOffset;
496 item->text = element->text.text;
497 return( item->mode );
504 if( item->mode != xData_itemModeEnd ) {
505 if( item->mode == xData_itemModeText ) {
506 item->mode = xData_itemModeElement;
507 if( item->element == NULL ) item->mode = xData_itemModeEnd;
508 item->textOffset += item->textLength;
509 item->textLength = 0;
510 item->text = &(item->parentElement->text.text[item->textOffset]); }
512 item->element = item->element->next;
513 item->mode = xData_itemModeText;
514 if( item->element == NULL ) {
515 if( item->textOffset < item->parentElement->text.length ) {
516 item->textLength = item->parentElement->text.length - item->textOffset; }
518 item->mode = xData_itemModeEnd;
521 item->textLength = item->element->textOffset - item->textOffset;
525 return( item->mode );
535 for( i = 0; i < attributes->number; i++ ) {
536 if( !strcmp( attributes->attributes[i].name, name ) ) {
537 value = attributes->attributes[i].value;
556 attributes->number = 0;
557 attributes->size = 0;
558 attributes->attributes = NULL;
570 xData_attribute *d, *
s;
574 if( ( dest->attributes = (xData_attribute*) xData_malloc2( smr, src->size, 0,
"attributes" ) ) == NULL )
return( 1 );
575 dest->number = src->number;
576 dest->size = src->size;
577 d = dest->attributes;
579 p = (
char *) &(dest->attributes[src->number]);
580 for( i = 0; i < src->number; i++, s++, d++ ) {
581 lens = strlen( s->name ) + 1;
583 strcpy( p, s->name );
585 lens = strlen( s->value ) + 1;
587 strcpy( p, s->value );
598 return( attributes->number );
605 if( index >= attributes->number )
return( NULL );
606 return( &(attributes->attributes[index]) );
613 attributes->number = 0;
614 attributes->size = 0;
616 attributes->attributes = (xData_attribute*)
xData_free( smr, attributes->attributes );
632 xDT->status = xData_xDataType_Ok;
633 xDT->typeString = NULL;
634 xDT->element = element;
636 xDT->toString = NULL;
638 xDT->indexPresent = 1;
639 xDT->startPresent = 1;
641 xDT->lengthPresent = 1;
652 int xData_getCommonData( statusMessageReporting *smr, xData_element *element, xData_Int *index, xData_Int *start, xData_Int *end,
653 xData_Int *length ) {
655 if( element->xDataTypeInfo.typeString == NULL ) {
659 *index = element->xDataTypeInfo.index;
660 *start = element->xDataTypeInfo.start;
661 *end = element->xDataTypeInfo.end;
662 *length = element->xDataTypeInfo.length;
670 xDataType *xDT = &(element->xDataTypeInfo);
681 if( ( xDT->endPresent > 0 ) ) {
682 if( xDT->lengthPresent > 0 ) {
683 smr_setMessageError( smr, smrUser, __FILE__, __LINE__, 1,
"missing length (or end) in xData" );
686 xDT->end = xDT->length; }
688 if( xDT->lengthPresent > 0 ) xDT->length = xDT->end;
691 if( xDT->startPresent > 0 ) xDT->start = 0;
692 if( xDT->start < 0 ) {
696 if( xDT->end < xDT->start ) {
697 smr_setMessageError( smr, smrUser, __FILE__, __LINE__, 1,
"start = %d >= end = %d", xDT->start, xDT->end );
700 if( xDT->length < 0 ) {
701 smr_setMessageError( smr, smrUser, __FILE__, __LINE__, 1,
"length = %d < 0", xDT->length );
719 *n = strtol( value, &e, 10 );
722 "could not convert attribute %s's value = %s to an integer", name, value );
738 *d = strtod( value, &e );
741 "could not convert attribute %s's values = %s to a double", name, value );
753 xData_element *child;
765 xData_element *child;
766 xData_elementListItem *p;
767 xData_elementList *list = NULL;
770 size =
sizeof( xData_elementList ) + n *
sizeof( xData_elementListItem );
772 if( ( list = (xData_elementList*) xData_malloc2( smr, size, 0,
"list" ) ) != NULL ) {
774 p = list->items = (xData_elementListItem *) &(list[1]);
776 if( !strcmp( child->name, tagName ) ) {
778 p->sortString = NULL;
789 const char *sortAttributeName, xData_sortElementFunc sortFunction ) {
793 xData_elementListItem *p;
796 if( sortFunction == NULL ) {
800 if( sortAttributeName == NULL ) sortAttributeName =
"index";
802 qsort( list->items, list->n,
sizeof( xData_elementListItem ), sortFunction );
812 xData_elementList *list;
813 xData_element *xData = NULL;
818 1,
"element %s does not have sub-element named %s", element->fullName, name ); }
819 else if( list->n > 1 ) {
821 "element %s contains more than one sub-element named %s", element->fullName, name ); }
823 xData = list->items[0].element;
846 name = element->name;
847 size = strlen( name ) + 1;
862 if( parentRoot->parentRoot == NULL ) {
864 s = (
char*) xData_malloc2( smr, n + 1, 0,
"traceback string" );
867 name = parentRoot->parentElement->name;
868 size = strlen( name ) + 1;
882 const char *s1 = ((xData_elementListItem *) p1)->sortString, *s2 = ((xData_elementListItem *) p2)->sortString;
884 if( s2 == NULL )
return( -1 );
885 if( s1 == NULL )
return( 1 );
886 return( strcmp( s1, s2 ) );
893 xData_element *
e1 = ((xData_elementListItem *) p1)->element, *
e2 = ((xData_elementListItem *) p2)->element;
895 return( e1->index -
e2->index );
900 int xData_is_xDataType( statusMessageReporting *smr, xDataType *xDT,
char const *
const type,
int setMsg ) {
902 if( xDT->typeString == NULL ) {
904 "element %s not xData object", xDT->element->fullName ); }
905 else if( xDT->typeString != type ) {
907 "Element %s is not xData object of type %s", type );
909 return( xDT->typeString == type );
916 return( doc->fileName );
921 int xData_setFileName( statusMessageReporting *smr, xData_document *doc,
char const *fileName ) {
923 doc->fileName = (
char*)
xData_free( smr, doc->fileName );
924 if( fileName != NULL ) {
926 if( ( doc->fileName = (
char*) xData_malloc2( smr, strlen( fileName ) + 1, 0,
"doc->fileName" ) ) == NULL )
return( 1 );
927 strcpy( doc->fileName, fileName );
936 xData_rootElement* root = element->parentRoot;
938 while( root->parentRoot != NULL ) root = root->parentRoot;
939 return( root->xData_doc );
946 if( doc == NULL )
return( NULL );
947 return( &(doc->smrUserInterface ) );
962 doc->smrUserInterface.doc = doc;
970 doc->smrUserInterface.smrUserInterface = NULL;
971 doc->smrUserInterface.doc = NULL;
979 int size, fileNameSize = 0, elementSize = 0;
980 xData_smr *smrUserInterface = (xData_smr *) userData;
981 static const char lcl[] =
"\nat line %d and column %d", el[] =
"\nin element ", fl[] =
"\nof file ";
982 char str_lcl[
sizeof( lcl ) + 40];
983 xData_rootElement *currentRoot = smrUserInterface->doc->currentRoot;
985 if( smrUserInterface->doc->fileName != NULL ) fileNameSize = strlen( smrUserInterface->doc->fileName ) + strlen( fl );
986 if( currentRoot != NULL ) {
987 if( currentRoot->parentElement != NULL ) {
988 sprintf( str_lcl, lcl, (
int)currentRoot->parentElement->docInfo.line, (
int)currentRoot->parentElement->docInfo.column );
989 elementSize = strlen( str_lcl ) + strlen( currentRoot->parentElement->fullName ) + strlen( el );
992 size = fileNameSize + elementSize;
993 if( ( fileNameSize != 0 ) && ( elementSize != 0 ) ) size++;
994 if( ( size > 0 ) && ( str != NULL ) ) {
996 if( ( *str = (
char*)
malloc( size + 1 ) ) == NULL )
return( -1 );
997 if( ( size != 0 ) && ( elementSize != 0 ) ) {
998 sprintf( *str,
"%s%s%s%s%s", str_lcl, el, currentRoot->parentElement->fullName, fl, smrUserInterface->doc->fileName ); }
999 else if( size != 0 ) {
1000 sprintf( *str,
"%s%s", fl, smrUserInterface->doc->fileName ); }
1002 sprintf( *str,
"%s%s%s", str_lcl, el, currentRoot->parentElement->fullName );
1010 int xData_stringTo_xData_Int( statusMessageReporting *smr,
void *smrUserInterface,
char const *c, xData_Int *value,
char const *endings,
char **e ) {
1014 int status = 1,
n =
sizeof( tmp );
1016 for( s = c; *s != 0; s++ )
if( !isspace( *s ) )
break;
1018 *value = strtol( s, e, 10 );
1022 if( *endings == 0 )
while( isspace( **e ) ) (*e)++;
1026 if( *endings == 0 ) {
1027 smr_setMessageError( smr, smrUserInterface, __FILE__, __LINE__, 1,
"integer string \"%s\" does not end with a '\\0'",
1030 if( strchr( endings, **e ) == NULL ) {
1031 smr_setMessageError( smr, smrUserInterface, __FILE__, __LINE__, 1,
"integer string \"%s\" does not end with a white space or a '\\0\'",
1044 int xData_stringTo_double( statusMessageReporting *smr,
void *smrUserInterface,
char const *c,
double *value,
char const *endings,
char **e ) {
1048 int status = 1,
n =
sizeof( tmp );
1050 for( s = c; *s != 0; s++ )
if( !isspace( *s ) )
break;
1051 *value = strtod( s, e );
1055 if( *endings == 0 )
while( isspace( **e ) ) (*e)++;
1059 if( *endings == 0 ) {
1060 smr_setMessageError( smr, smrUserInterface, __FILE__, __LINE__, 1,
"double string \"%s\" does not end with a '\\0'",
1063 if( strchr( endings, **e ) == NULL ) {
1064 smr_setMessageError( smr, smrUserInterface, __FILE__, __LINE__, 1,
"double string \"%s\" does not end with a white space or a '\\0\'",
1080 element->accessed += increment;
1081 return( element->accessed );
1089 return( element->accessed );
1096 if( strlen( In ) > size ) {
1097 strncpy( Out, In, size - 5 );
1099 strcat( Out,
" ..." );
1105 #if defined __cplusplus
xData_Int xData_convertAttributeTo_xData_Int(statusMessageReporting *smr, xData_element *element, const char *name, xData_Int *n)
int xData_init_2d_xy(statusMessageReporting *smr, xData_element *element)
static int xData_parseInitializeText(xData_document *doc, xData_text *text)
xData_element * xData_getOneElementByTagName(statusMessageReporting *smr, xData_element *element, char *name, int required)
static void xData_parseFreeElementItems(statusMessageReporting *smr, xData_element *element)
int xData_addToAccessed(statusMessageReporting *, xData_element *element, int increment)
int xData_initializeAttributionList(statusMessageReporting *, xData_attributionList *attributes)
XML_Size XMLCALL XML_GetCurrentLineNumber(XML_Parser parser)
int xData_stringTo_xData_Int(statusMessageReporting *smr, void *smrUserInterface, char const *c, xData_Int *value, char const *endings, char **e)
char const * xData_getFileName(xData_document *doc)
enum xData_itemMode xData_getNextItem(xData_item *item)
int xData_xDataTypeConvertAttributes(statusMessageReporting *smr, xData_element *element)
xData_element * xData_getElements_xDataElement(statusMessageReporting *smr, xData_element *element)
int xData_init_2d_xShared_yHistogram(statusMessageReporting *smr, xData_element *element)
static void XMLCALL xData_parseEndElement(void *userData, const char *name)
int xData_getCommonData(statusMessageReporting *smr, xData_element *element, xData_Int *index, xData_Int *start, xData_Int *end, xData_Int *length)
xData_element * xData_getNextElement(xData_element *element)
static enum xData_errorCodes xData_parseGetCurrentPosition(xData_document *doc, xData_docInfo *docInfo)
const XML_LChar *XMLCALL XML_ErrorString(enum XML_Error code)
XML_Size XMLCALL XML_GetCurrentColumnNumber(XML_Parser parser)
xData_document * xData_parseReadFile(statusMessageReporting *smr, const char *fileName, xData_xDataTypeOk func, void *userData)
xData_attribute * xData_attributeByIndex(xData_attributionList *attributes, int index)
int smr_setMessageError(statusMessageReporting *smr, void *userInterface, const char *file, int line, int code, const char *fmt,...)
const char * xData_getAttributesValueInElement(xData_element *element, const char *name)
static void XMLCALL xData_parseStartElement(void *userData, const char *name, const char **attris)
char * xData_getAttributesValue(xData_attributionList *attributes, const char *name)
XML_Parser XMLCALL XML_ParserCreate(const XML_Char *encodingName)
int xData_init_2d_xindex_y(statusMessageReporting *smr, xData_element *element)
void * xData_get_smrUserInterfaceFromDocument(xData_document *doc)
int xData_getAccessed(statusMessageReporting *, xData_element *element)
xData_elementList * xData_getElementsByTagNameAndSort(statusMessageReporting *smr, xData_element *element, const char *tagName, const char *sortAttributeName, xData_sortElementFunc sortFunction)
xData_element * xData_getFirstElement(xData_element *element)
xData_element * xData_getDocumentsElement(xData_document *doc)
static void XMLCALL xData_parseCharacterData(void *userData, const XML_Char *s, int len)
void * xData_parseFree(statusMessageReporting *smr, xData_document *doc)
static char * xData_getTraceback2(statusMessageReporting *smr, xData_rootElement *parentRoot, int n)
int smr_isOk(statusMessageReporting *smr)
static int xData_elementList_defaultSorter(void const *p1, void const *p2)
int xData_parseIsError(xData_document *doc)
void XMLCALL XML_SetUserData(XML_Parser parser, void *p)
static int xData_smrUserInterfaceInitialize(xData_document *doc)
static int xData_smrUserInterface(void *userData, char **smr)
static void * xData_parseFreeElement(statusMessageReporting *smr, xData_element *element)
xData_document * xData_parseMalloc(statusMessageReporting *smr, xData_xDataTypeOk func, void *userData)
static void xData_parseInitializeRootElement(xData_document *doc, xData_rootElement *re, xData_element *parentElement, int depth)
enum XML_Error XMLCALL XML_GetErrorCode(XML_Parser parser)
xData_elementList * xData_getElementsByTagName(statusMessageReporting *smr, xData_element *element, const char *tagName)
int xData_numberOfElementsByTagName(statusMessageReporting *, xData_element *element, const char *tagName)
static char const * xData_shortStringForMessage(size_t size, char *Out, char const *In)
int xData_is_xDataType(statusMessageReporting *smr, xDataType *xDT, char const *const type, int setMsg)
static int xData_init_xDataTypeNone(xDataType *xDT, xData_element *element)
int xData_releaseAttributionList(statusMessageReporting *smr, xData_attributionList *attributes)
int xData_parseInitialize(statusMessageReporting *smr, xData_document *doc, xData_xDataTypeOk func, void *userData)
void XMLCALL XML_SetElementHandler(XML_Parser parser, XML_StartElementHandler start, XML_EndElementHandler end)
xData_document * xData_getElementsDocument(xData_element *element)
void * xData_free(statusMessageReporting *, void *p)
int xData_init_1d_x(statusMessageReporting *smr, xData_element *element)
enum xData_itemMode xData_getFirstItem(xData_element *element, xData_item *item)
static int xData_parseAddElementToRoot(statusMessageReporting *smr, xData_rootElement *parentRoot, const char *name, const char **attris)
int xData_stringTo_double(statusMessageReporting *smr, void *smrUserInterface, char const *c, double *value, char const *endings, char **e)
void * xData_get_smrUserInterfaceFromElement(xData_element *element)
static int xData_smrUserInterfaceFree(xData_document *doc)
int xData_copyAttributionList(statusMessageReporting *smr, xData_attributionList *dest, xData_attributionList *src)
void XMLCALL XML_SetCharacterDataHandler(XML_Parser parser, XML_CharacterDataHandler handler)
int xData_setFileName(statusMessageReporting *smr, xData_document *doc, char const *fileName)
int xData_convertAttributeToDouble(statusMessageReporting *smr, xData_element *element, const char *name, double *d)
int xData_parse(xData_document *doc, const char *s)
void * malloc(size_t __size)
int xData_init_matrix(statusMessageReporting *smr, xData_element *element)
enum XML_Status XMLCALL XML_Parse(XML_Parser parser, const char *s, int len, int isFinal)
static char * xData_getTraceback(statusMessageReporting *smr, xData_element *element)
static int xData_elementList_indexSorter(void const *p1, void const *p2)
void XMLCALL XML_ParserFree(XML_Parser parser)
int xData_attributeListLength(xData_attributionList *attributes)
xData_document * xData_parseString(statusMessageReporting *smr, const char *str, xData_xDataTypeOk func, void *userData)
int xData_parseEndOfXML(statusMessageReporting *smr, xData_document *doc)
void xData_freeElementList(statusMessageReporting *smr, xData_elementList *list)