declarations for XML parsing
Definition in file xml.h.
Go to the source code of this file.
Functions | |
XML_NODE * | xmlProcess (const char *filename) |
XML_NODE * | xmlNewNode (const char *name, int lineno) |
XML_ATTR * | xmlNewAttr (const char *name, const char *value) |
void | xmlAddAttr (XML_NODE *n, XML_ATTR *a) |
void | xmlAppendChild (XML_NODE *parent, XML_NODE *child) |
void | xmlFreeNode (XML_NODE *node) |
void | xmlShowNode (const XML_NODE *root) |
const char * | xmlGetAttrval (const XML_NODE *node, const char *name) |
const XML_NODE * | xmlFirstNode (const XML_NODE *node, const char *name) |
const XML_NODE * | xmlNextNode (const XML_NODE *node, const char *name) |
const XML_NODE * | xmlFindNode (const XML_NODE *node, const char *name) |
const XML_NODE * | xmlFindNodeMaxdepth (const XML_NODE *node, const char *name, int depth, int maxdepth) |
const XML_NODE * | xmlNextSibl (const XML_NODE *node) |
const XML_NODE * | xmlPrevSibl (const XML_NODE *node) |
const XML_NODE * | xmlFirstChild (const XML_NODE *node) |
const XML_NODE * | xmlLastChild (const XML_NODE *node) |
const char * | xmlGetName (const XML_NODE *node) |
int | xmlGetLine (const XML_NODE *node) |
const char * | xmlGetData (const XML_NODE *node) |
const char * | xmlFindPcdata (const XML_NODE *node, const char *name) |
XML_NODE * xmlProcess | ( | const char * | filename | ) |
Parse file
filename | XML file name |
Definition at line 1085 of file xmlparse.c.
References assert(), 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(), result, SCIPstrncpy(), parse_pos_struct::state, parse_pos_struct::top, TRUE, XML_Bool, XML_STATE_BEFORE, xmlAddAttr(), xmlErrmsg(), xmlError, xmlFreeNode(), xmlNewAttr(), xmlNewNode(), and xmlParse().
Referenced by readXmlSolFile(), and SCIP_DECL_READERREAD().
XML_NODE * xmlNewNode | ( | const char * | name, |
int | lineno ) |
create new node
Definition at line 1176 of file xmlparse.c.
References assert(), BMSallocMemory, BMSclearMemory, BMSduplicateMemoryArray, and NULL.
Referenced by handleDecl(), handleStarttag(), procPcdata(), and xmlProcess().
XML_ATTR * xmlNewAttr | ( | const char * | name, |
const char * | value ) |
create new attribute
Definition at line 1195 of file xmlparse.c.
References a, assert(), BMSallocMemory, BMSclearMemory, BMSduplicateMemoryArray, and NULL.
Referenced by procInTag(), and xmlProcess().
add attribute
Definition at line 1215 of file xmlparse.c.
References a, assert(), and NULL.
Referenced by procInTag(), and xmlProcess().
append child node
Definition at line 1228 of file xmlparse.c.
References assert(), and NULL.
Referenced by handleDecl(), handleStarttag(), and procPcdata().
void xmlFreeNode | ( | XML_NODE * | node | ) |
free node
Definition at line 1275 of file xmlparse.c.
References assert(), BMSfreeMemory, BMSfreeMemoryArray, NULL, xmlFreeAttr(), and xmlFreeNode().
Referenced by readXmlSolFile(), SCIP_DECL_READERREAD(), xmlFreeNode(), and xmlProcess().
void xmlShowNode | ( | const XML_NODE * | root | ) |
output node
Definition at line 1309 of file xmlparse.c.
References a, assert(), infoMessage, NULL, and xmlShowNode().
Referenced by SCIP_DECL_READERREAD(), and xmlShowNode().
const char * xmlGetAttrval | ( | const XML_NODE * | node, |
const char * | name ) |
get attribute value
Definition at line 1337 of file xmlparse.c.
References a, assert(), infoMessage, and NULL.
Referenced by readConstraints(), readExpression(), readLinearCoefs(), readMultIncr(), readNConstraints(), readNonlinearExprs(), readObjective(), readQuadraticCoefs(), readSOScons(), readVariables(), and readXmlSolFile().
return first node
Definition at line 1362 of file xmlparse.c.
References assert(), and NULL.
Referenced by xmlNextNode().
return next node
Definition at line 1382 of file xmlparse.c.
References assert(), NULL, and xmlFirstNode().
find node
Definition at line 1394 of file xmlparse.c.
References assert(), NULL, r, and xmlFindNode().
Referenced by xmlFindNode(), and xmlFindPcdata().
const XML_NODE * xmlFindNodeMaxdepth | ( | const XML_NODE * | node, |
const char * | name, | ||
int | depth, | ||
int | maxdepth ) |
find node with bound on the depth
node | current node - use start node to begin |
name | name of tag to search for |
depth | current depth - start with 0 for root |
maxdepth | maximal depth |
Definition at line 1419 of file xmlparse.c.
References assert(), depth, maxdepth, NULL, r, and xmlFindNodeMaxdepth().
Referenced by readConstraints(), readLinearCoefs(), readNConstraints(), readNonlinearExprs(), readObjective(), readQuadraticCoefs(), readSOScons(), readVariables(), readXmlSolFile(), SCIP_DECL_READERREAD(), and xmlFindNodeMaxdepth().
return next sibling
Definition at line 1449 of file xmlparse.c.
References assert(), and NULL.
Referenced by readConstraints(), readExpression(), readLinearCoefs(), readNonlinearExprs(), readObjective(), readQuadraticCoefs(), readSOScons(), readVariables(), and readXmlSolFile().
return first child
Definition at line 1469 of file xmlparse.c.
References assert(), and NULL.
Referenced by readConstraints(), readExpression(), readLinearCoefs(), readNonlinearExprs(), readObjective(), readQuadraticCoefs(), readSOScons(), readVariables(), readXmlSolFile(), and SCIP_DECL_READERREAD().
const char * xmlGetName | ( | const XML_NODE * | node | ) |
return name of node
Definition at line 1489 of file xmlparse.c.
References assert(), and NULL.
Referenced by readExpression(), readLinearCoefs(), readNonlinearExprs(), readQuadraticCoefs(), and readSOScons().
int xmlGetLine | ( | const XML_NODE * | node | ) |
const char * xmlGetData | ( | const XML_NODE * | node | ) |
get data
Definition at line 1509 of file xmlparse.c.
References assert(), and NULL.
Referenced by readLinearCoefs(), readObjective(), and SCIP_DECL_READERREAD().
const char * xmlFindPcdata | ( | const XML_NODE * | node, |
const char * | name ) |
find PCDATA
Definition at line 1519 of file xmlparse.c.
References assert(), NULL, and xmlFindNode().