declarations for XML parsing
Definition in file xml.h.
Go to the source code of this file.
Functions | |
| XML_NODE * | SCIPxmlProcess (const char *filename) |
| XML_NODE * | SCIPxmlNewNode (const char *name, int lineno) |
| XML_ATTR * | SCIPxmlNewAttr (const char *name, const char *value) |
| void | SCIPxmlAddAttr (XML_NODE *n, XML_ATTR *a) |
| void | SCIPxmlAppendChild (XML_NODE *parent, XML_NODE *child) |
| void | SCIPxmlFreeNode (XML_NODE *node) |
| void | SCIPxmlShowNode (const XML_NODE *root) |
| const char * | SCIPxmlGetAttrval (const XML_NODE *node, const char *name) |
| const XML_NODE * | SCIPxmlFirstNode (const XML_NODE *node, const char *name) |
| const XML_NODE * | SCIPxmlNextNode (const XML_NODE *node, const char *name) |
| const XML_NODE * | SCIPxmlFindNode (const XML_NODE *node, const char *name) |
| const XML_NODE * | SCIPxmlFindNodeMaxdepth (const XML_NODE *node, const char *name, int depth, int maxdepth) |
| const XML_NODE * | SCIPxmlNextSibl (const XML_NODE *node) |
| const XML_NODE * | SCIPxmlPrevSibl (const XML_NODE *node) |
| const XML_NODE * | SCIPxmlFirstChild (const XML_NODE *node) |
| const XML_NODE * | SCIPxmlLastChild (const XML_NODE *node) |
| const char * | SCIPxmlGetName (const XML_NODE *node) |
| int | SCIPxmlGetLine (const XML_NODE *node) |
| const char * | SCIPxmlGetData (const XML_NODE *node) |
| const char * | SCIPxmlFindPcdata (const XML_NODE *node, const char *name) |
| XML_NODE * SCIPxmlProcess | ( | const char * | filename | ) |
Parse file
| filename | XML file name |
Definition at line 1089 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(), SCIPxmlAddAttr(), SCIPxmlFreeNode(), SCIPxmlNewAttr(), SCIPxmlNewNode(), SCIPxmlProcess(), parse_pos_struct::state, parse_pos_struct::top, TRUE, XML_Bool, XML_STATE_BEFORE, xmlErrmsg(), xmlError, and xmlParse().
Referenced by readXmlSolFile(), SCIP_DECL_READERREAD(), and SCIPxmlProcess().
| XML_NODE * SCIPxmlNewNode | ( | const char * | name, |
| int | lineno ) |
create new node
Definition at line 1172 of file xmlparse.c.
References assert(), BMSallocMemory, BMSclearMemory, BMSduplicateMemoryArray, NULL, and SCIPxmlNewNode().
Referenced by handleDecl(), handleStarttag(), procPcdata(), SCIPxmlNewNode(), and SCIPxmlProcess().
| XML_ATTR * SCIPxmlNewAttr | ( | const char * | name, |
| const char * | value ) |
create new attribute
Definition at line 1191 of file xmlparse.c.
References a, assert(), BMSallocMemory, BMSclearMemory, BMSduplicateMemoryArray, SCIP_Var::name, NULL, and SCIPxmlNewAttr().
Referenced by procInTag(), SCIPxmlNewAttr(), and SCIPxmlProcess().
add attribute
Definition at line 1211 of file xmlparse.c.
References a, assert(), NULL, and SCIPxmlAddAttr().
Referenced by procInTag(), SCIPxmlAddAttr(), and SCIPxmlProcess().
append child node
Definition at line 1224 of file xmlparse.c.
References assert(), NULL, and SCIPxmlAppendChild().
Referenced by handleDecl(), handleStarttag(), procPcdata(), and SCIPxmlAppendChild().
| void SCIPxmlFreeNode | ( | XML_NODE * | node | ) |
free node
Definition at line 1271 of file xmlparse.c.
References assert(), BMSfreeMemory, BMSfreeMemoryArray, NULL, SCIPxmlFreeNode(), and xmlFreeAttr().
Referenced by readXmlSolFile(), SCIP_DECL_READERREAD(), SCIPxmlFreeNode(), and SCIPxmlProcess().
| void SCIPxmlShowNode | ( | const XML_NODE * | root | ) |
output node
Definition at line 1305 of file xmlparse.c.
References a, assert(), infoMessage, SCIP_Var::name, NULL, and SCIPxmlShowNode().
Referenced by SCIP_DECL_READERREAD(), and SCIPxmlShowNode().
| const char * SCIPxmlGetAttrval | ( | const XML_NODE * | node, |
| const char * | name ) |
get attribute value
Definition at line 1333 of file xmlparse.c.
References a, assert(), infoMessage, SCIP_Var::name, NULL, and SCIPxmlGetAttrval().
Referenced by readConstraints(), readExpression(), readLinearCoefs(), readMultIncr(), readNConstraints(), readNonlinearExprs(), readObjective(), readQuadraticCoefs(), readSOScons(), readVariables(), readXmlSolFile(), and SCIPxmlGetAttrval().
return first node
Definition at line 1358 of file xmlparse.c.
References assert(), NULL, and SCIPxmlFirstNode().
Referenced by SCIPxmlFirstNode(), and SCIPxmlNextNode().
return next node
Definition at line 1378 of file xmlparse.c.
References assert(), NULL, SCIPxmlFirstNode(), and SCIPxmlNextNode().
Referenced by SCIPxmlNextNode().
find node
Definition at line 1390 of file xmlparse.c.
References assert(), NULL, r, and SCIPxmlFindNode().
Referenced by SCIPxmlFindNode(), and SCIPxmlFindPcdata().
| const XML_NODE * SCIPxmlFindNodeMaxdepth | ( | 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 1415 of file xmlparse.c.
References assert(), depth, maxdepth, NULL, r, and SCIPxmlFindNodeMaxdepth().
Referenced by readConstraints(), readLinearCoefs(), readNConstraints(), readNonlinearExprs(), readObjective(), readQuadraticCoefs(), readSOScons(), readVariables(), readXmlSolFile(), SCIP_DECL_READERREAD(), and SCIPxmlFindNodeMaxdepth().
return next sibling
Definition at line 1445 of file xmlparse.c.
References assert(), NULL, and SCIPxmlNextSibl().
Referenced by readConstraints(), readExpression(), readLinearCoefs(), readNonlinearExprs(), readObjective(), readQuadraticCoefs(), readSOScons(), readVariables(), readXmlSolFile(), and SCIPxmlNextSibl().
return previous sibling
Definition at line 1455 of file xmlparse.c.
References assert(), NULL, and SCIPxmlPrevSibl().
Referenced by SCIPxmlPrevSibl().
return first child
Definition at line 1465 of file xmlparse.c.
References assert(), NULL, and SCIPxmlFirstChild().
Referenced by readConstraints(), readExpression(), readLinearCoefs(), readNonlinearExprs(), readObjective(), readQuadraticCoefs(), readSOScons(), readVariables(), readXmlSolFile(), SCIP_DECL_READERREAD(), and SCIPxmlFirstChild().
return last child
Definition at line 1475 of file xmlparse.c.
References assert(), NULL, and SCIPxmlLastChild().
Referenced by SCIPxmlLastChild().
| const char * SCIPxmlGetName | ( | const XML_NODE * | node | ) |
return name of node
Definition at line 1485 of file xmlparse.c.
References assert(), NULL, and SCIPxmlGetName().
Referenced by readExpression(), readLinearCoefs(), readNonlinearExprs(), readQuadraticCoefs(), readSOScons(), and SCIPxmlGetName().
| int SCIPxmlGetLine | ( | const XML_NODE * | node | ) |
get line number
Definition at line 1495 of file xmlparse.c.
References assert(), NULL, and SCIPxmlGetLine().
Referenced by SCIPxmlGetLine().
| const char * SCIPxmlGetData | ( | const XML_NODE * | node | ) |
get data
Definition at line 1505 of file xmlparse.c.
References assert(), NULL, and SCIPxmlGetData().
Referenced by readLinearCoefs(), readObjective(), SCIP_DECL_READERREAD(), and SCIPxmlGetData().
| const char * SCIPxmlFindPcdata | ( | const XML_NODE * | node, |
| const char * | name ) |
find PCDATA
Definition at line 1515 of file xmlparse.c.
References assert(), NULL, SCIPxmlFindNode(), and SCIPxmlFindPcdata().
Referenced by SCIPxmlFindPcdata().