mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Adding XPath support: ExtractValue and UpdateXML functions.
libmysqld/Makefile.am: sql/Makefile.am: Adding new source files. Adding new file into build process. include/my_xml.h: strings/xml.c: Adding new XML parse flags to skip text normalization and to use relative tag names. Adding enum for XML token types. sql/lex.h: Making parser aware of new SQL functions. sqll/item_create.h, sql/item_create.cc: Adding creators for ExtractValue and UpdateXML. sql/item.h: Adding new Item types: nodeset and nodeset comparator. sql/item_xmlfunc.h sql/item_xmlfunc.cc Adding new classes implementing XPath functions. mysql-test/t/xml.test, mysql-test/r/xml.result: New files: adding test case include/my_xml.h: Adding ExtractValue and UpdateXML functions. Adding XML parser flags and enum for XML token types. sql/Makefile.am: Adding new source files. sql/item.h: Adding new Item types: nodeset and nodeset comparator. sql/item_create.cc: Adding creators for ExtractValue and UpdateXML. sql/item_create.h: Adding creators for ExtractValue and UpdateXML. sql/lex.h: Make parse aware of new SQL functions. strings/xml.c: Adding new flags to skip text normalization and to use relative tag names. libmysqld/Makefile.am: Adding new file into build process.
This commit is contained in:
@ -26,8 +26,31 @@ extern "C" {
|
||||
#define MY_XML_OK 0
|
||||
#define MY_XML_ERROR 1
|
||||
|
||||
/*
|
||||
A flag whether to use absolute tag names in call-back functions,
|
||||
like "a", "a.b" and "a.b.c" (used in character set file parser),
|
||||
or relative names like "a", "b" and "c".
|
||||
*/
|
||||
#define MY_XML_FLAG_RELATIVE_NAMES 1
|
||||
|
||||
/*
|
||||
A flag whether to skip normilization of text values before calling
|
||||
call-back functions: i.e. skip leading/trailing spaces,
|
||||
\r, \n, \t characters.
|
||||
*/
|
||||
#define MY_XML_FLAG_SKIP_TEXT_NORMALIZATION 2
|
||||
|
||||
enum my_xml_node_type
|
||||
{
|
||||
MY_XML_NODE_TAG, /* can have TAG, ATTR and TEXT children */
|
||||
MY_XML_NODE_ATTR, /* can have TEXT children */
|
||||
MY_XML_NODE_TEXT /* cannot have children */
|
||||
};
|
||||
|
||||
typedef struct xml_stack_st
|
||||
{
|
||||
int flags;
|
||||
enum my_xml_node_type current_node_type;
|
||||
char errstr[128];
|
||||
char attr[128];
|
||||
char *attrend;
|
||||
|
Reference in New Issue
Block a user