All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
xmlparse.c File Reference #include <blockmemshell/memory.h> #include "xml.h" #include "xmldef.h" #include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <assert.h> #include <ctype.h> #include <string.h> Go to the source code of this file.
Macro Definition Documentation
Definition at line 47 of file xmlparse.c. Referenced by getName().
Definition at line 48 of file xmlparse.c. Referenced by getAttrval().
Definition at line 49 of file xmlparse.c. Referenced by doCdata(), and procPcdata().
Definition at line 50 of file xmlparse.c. Referenced by mygetc(). Definition at line 52 of file xmlparse.c. Referenced by doCdata(), doComment(), getAttrval(), getName(), handleDecl(), handleEndtag(), handlePi(), handleStarttag(), popPstack(), procBefore(), procInTag(), procPcdata(), xmlParse(), and xmlProcess(). Typedef Documentation
Definition at line 56 of file xmlparse.c.
Definition at line 57 of file xmlparse.c.
Definition at line 68 of file xmlparse.c. Enumeration Type Documentation
state of the parser Definition at line 60 of file xmlparse.c. Function Documentation
output error message with corresponding line and position Definition at line 93 of file xmlparse.c. References parse_pos_struct::buf, parse_pos_struct::filename, parse_pos_struct::lineno, NULL, and parse_pos_struct::pos. Referenced by xmlProcess(). Push new element on the parse stack. TRUE if it worked, FAILURE otherwise. Definition at line 152 of file xmlparse.c. References ALLOC_FALSE, BMSallocMemory, debugMessage, parse_stack_struct::next, parse_stack_struct::node, NULL, parse_pos_struct::top, and TRUE. Referenced by handleStarttag(), and xmlProcess(). returns top element on stack (which has to be present) Definition at line 175 of file xmlparse.c. References parse_stack_struct::node, NULL, and parse_pos_struct::top. Referenced by handleDecl(), handleEndtag(), handleStarttag(), procInTag(), and procPcdata(). remove top element from stack and deletes it TRUE if ok, FALSE otherwise
Definition at line 190 of file xmlparse.c. References BMSfreeMemory, debugMessage, FALSE, parse_stack_struct::next, parse_stack_struct::node, NULL, parse_pos_struct::top, TRUE, XML_Bool, and xmlError. Referenced by clearPstack(), handleEndtag(), and procInTag().
remove complete stack Definition at line 218 of file xmlparse.c. References NULL, popPstack(), and parse_pos_struct::top. Referenced by xmlProcess().
Returns the next character from the input buffer and fills the buffer if it is empty (similar to fgetc()). Definition at line 232 of file xmlparse.c. References parse_pos_struct::buf, FGETS, parse_pos_struct::fp, FREAD, LINE_BUF_SIZE, NULL, and parse_pos_struct::pos. Referenced by getsymbol().
Read input from fp_in (variant). Here we convert all LF or CR into SPACE and return maximally one SPACE after the other.
Definition at line 305 of file xmlparse.c. References debugMessage, parse_pos_struct::lastsym, parse_pos_struct::lineno, mygetc(), parse_pos_struct::nextsym, and NULL. Referenced by doCdata(), doComment(), getAttrval(), getName(), handleDecl(), handlePi(), procBefore(), procInTag(), procPcdata(), and skipSpace().
Reinserts a character into the input stream Definition at line 341 of file xmlparse.c. References parse_pos_struct::nextsym, and NULL. Referenced by getName(), procBefore(), procInTag(), and procPcdata().
Skip all spaces and return the next non-space character or EOF Definition at line 354 of file xmlparse.c. References getsymbol(), and NULL. Referenced by getAttrval(), handleEndtag(), procBefore(), procInTag(), and procPcdata().
Get name of a TAG or attribute from the input stream. Either it returns a pointer to allocated memory which contains the name or it returns NULL if there is some error. Definition at line 377 of file xmlparse.c. References ALLOC_ABORT, BMSallocMemoryArray, BMSfreeMemoryArray, BMSreallocMemoryArray, getsymbol(), NAME_EXT_SIZE, NULL, ungetsymbol(), and xmlError. Referenced by handleEndtag(), handleStarttag(), and procInTag().
Read the value of an attribute from the input stream. The value has to be between two " or ' (the other character is then valid as well). The function returns a pointer to allocated memory containing the value or it returns NULL in case of an error. Definition at line 442 of file xmlparse.c. References ALLOC_ABORT, ATTR_EXT_SIZE, BMSallocMemoryArray, BMSfreeMemoryArray, BMSreallocMemoryArray, getsymbol(), NULL, skipSpace(), and xmlError. Referenced by procInTag(). Skip comment Return FALSE if an error occurs. Definition at line 506 of file xmlparse.c. References FALSE, getsymbol(), NULL, TRUE, XML_Bool, and xmlError. Referenced by handleDecl().
Handles a CDATA section. Returns a pointer to allocated memory containing the data of this section or NULL in case of an error. Definition at line 542 of file xmlparse.c. References ALLOC_ABORT, BMSallocMemoryArray, BMSfreeMemoryArray, BMSreallocMemoryArray, DATA_EXT_SIZE, getsymbol(), NULL, and xmlError. Referenced by handleDecl().
Handle processing instructions (skipping) Definition at line 608 of file xmlparse.c. References getsymbol(), NULL, parse_pos_struct::state, XML_STATE_BEFORE, XML_STATE_ERROR, XML_STATE_PCDATA, and xmlError. Referenced by procBefore().
Handles declarations that start with a <!. This includes comments. Does currenlty not work very well, because of DTDs. Definition at line 637 of file xmlparse.c. References BMSduplicateMemoryArray, BMSfreeMemoryArray, doCdata(), doComment(), getsymbol(), parse_pos_struct::lineno, NULL, parse_pos_struct::state, topPstack(), XML_STATE_BEFORE, XML_STATE_ERROR, xmlAppendChild(), xmlError, and xmlNewNode(). Referenced by procBefore().
Handle end tag Definition at line 739 of file xmlparse.c. References BMSfreeMemoryArray, getName(), NULL, popPstack(), skipSpace(), parse_pos_struct::state, topPstack(), XML_STATE_ERROR, XML_STATE_PCDATA, and xmlError. Referenced by procBefore().
Handle start tag Definition at line 780 of file xmlparse.c. References BMSfreeMemoryArray, getName(), parse_pos_struct::lineno, NULL, pushPstack(), parse_pos_struct::state, topPstack(), XML_STATE_ERROR, XML_STATE_IN_TAG, xmlAppendChild(), xmlError, and xmlNewNode(). Referenced by procBefore().
Checks for next tag
Definition at line 818 of file xmlparse.c. References getsymbol(), handleDecl(), handleEndtag(), handlePi(), handleStarttag(), NULL, skipSpace(), parse_pos_struct::state, ungetsymbol(), XML_STATE_BEFORE, XML_STATE_ERROR, and xmlError. Referenced by xmlParse().
Process tag
Definition at line 863 of file xmlparse.c. References BMSfreeMemoryArray, FALSE, getAttrval(), getName(), getsymbol(), NULL, popPstack(), skipSpace(), parse_pos_struct::state, topPstack(), TRUE, ungetsymbol(), XML_Bool, XML_STATE_ERROR, XML_STATE_IN_TAG, XML_STATE_PCDATA, xmlAddAttr(), xmlError, and xmlNewAttr(). Referenced by xmlParse().
Definition at line 946 of file xmlparse.c. References ALLOC_ABORT, BMSallocMemoryArray, BMSduplicateMemoryArray, BMSfreeMemoryArray, BMSreallocMemoryArray, DATA_EXT_SIZE, getsymbol(), parse_pos_struct::lineno, NULL, skipSpace(), parse_pos_struct::state, topPstack(), ungetsymbol(), XML_STATE_BEFORE, XML_STATE_EOF, XML_STATE_ERROR, XML_STATE_PCDATA, xmlAppendChild(), xmlError, and xmlNewNode(). Referenced by xmlParse(). Parse input stream
Definition at line 1032 of file xmlparse.c. References debugMessage, FALSE, procBefore(), procInTag(), procPcdata(), parse_pos_struct::state, TRUE, XML_Bool, XML_STATE_BEFORE, XML_STATE_EOF, XML_STATE_ERROR, XML_STATE_IN_TAG, XML_STATE_PCDATA, and xmlError. Referenced by xmlProcess().
Parse file
Definition at line 1068 of file xmlparse.c. References BMSallocMemoryArray, BMScopyMemoryArray, BMSfreeMemoryArray, parse_pos_struct::buf, clearPstack(), FALSE, FCLOSE, parse_pos_struct::filename, FOPEN, parse_pos_struct::fp, parse_pos_struct::lastsym, parse_pos_struct::lineno, parse_pos_struct::nextsym, NULL, parse_pos_struct::pos, pushPstack(), parse_pos_struct::state, parse_pos_struct::top, TRUE, XML_Bool, XML_STATE_BEFORE, xmlAddAttr(), xmlErrmsg(), xmlError, xmlFreeNode(), xmlNewAttr(), xmlNewNode(), and xmlParse(). Referenced by readXMLSol(), and SCIP_DECL_READERREAD().
create new node Definition at line 1159 of file xmlparse.c. References BMSallocMemory, BMSclearMemory, BMSduplicateMemoryArray, and NULL. Referenced by handleDecl(), handleStarttag(), procPcdata(), and xmlProcess().
create new attribute Definition at line 1178 of file xmlparse.c. References BMSallocMemory, BMSclearMemory, BMSduplicateMemoryArray, and NULL. Referenced by procInTag(), and xmlProcess(). add attribute Definition at line 1198 of file xmlparse.c. References NULL. Referenced by procInTag(), and xmlProcess(). append child node Definition at line 1211 of file xmlparse.c. References NULL. Referenced by handleDecl(), handleStarttag(), and procPcdata().
free attribute Definition at line 1233 of file xmlparse.c. References BMSfreeMemory, BMSfreeMemoryArray, and NULL. Referenced by xmlFreeNode().
free node Definition at line 1270 of file xmlparse.c. References BMSfreeMemory, BMSfreeMemoryArray, NULL, xmlFreeAttr(), and xmlFreeNode(). Referenced by readXMLSol(), SCIP_DECL_READERREAD(), xmlFreeNode(), and xmlProcess().
output node Definition at line 1320 of file xmlparse.c. References infoMessage, NULL, and xmlShowNode(). Referenced by SCIP_DECL_READERREAD(), and xmlShowNode().
get attribute value Definition at line 1348 of file xmlparse.c. References infoMessage, and NULL. Referenced by readConstraints(), readExpression(), readLinearCoefs(), readMultIncr(), readNonlinearExprs(), readObjective(), readQuadraticCoefs(), readSOScons(), readVariables(), and readXMLSol(). return first node Definition at line 1374 of file xmlparse.c. References NULL. Referenced by xmlNextNode(). find node Definition at line 1406 of file xmlparse.c. References NULL, and xmlFindNode(). Referenced by xmlFindNode(), and xmlFindPcdata().
find node with bound on the depth
Definition at line 1445 of file xmlparse.c. References NULL, and xmlFindNodeMaxdepth(). Referenced by readConstraints(), readLinearCoefs(), readNonlinearExprs(), readObjective(), readQuadraticCoefs(), readSOScons(), readVariables(), readXMLSol(), SCIP_DECL_READERREAD(), and xmlFindNodeMaxdepth(). return next sibling Definition at line 1475 of file xmlparse.c. References NULL. Referenced by readConstraints(), readExpression(), readLinearCoefs(), readNonlinearExprs(), readObjective(), readQuadraticCoefs(), readSOScons(), readVariables(), and readXMLSol(). return first child Definition at line 1495 of file xmlparse.c. References NULL. Referenced by readConstraints(), readExpression(), readLinearCoefs(), readNonlinearExprs(), readObjective(), readQuadraticCoefs(), readSOScons(), readVariables(), readXMLSol(), and SCIP_DECL_READERREAD().
return name of node Definition at line 1515 of file xmlparse.c. References NULL. Referenced by readExpression(), readLinearCoefs(), readNonlinearExprs(), readQuadraticCoefs(), and readSOScons().
get data Definition at line 1535 of file xmlparse.c. References NULL. Referenced by readLinearCoefs(), readObjective(), and SCIP_DECL_READERREAD().
|