Back to index

php5  5.3.10
php_simplexml.h
Go to the documentation of this file.
00001 /*
00002   +----------------------------------------------------------------------+
00003   | PHP Version 5                                                        |
00004   +----------------------------------------------------------------------+
00005   | Copyright (c) 1997-2012 The PHP Group                                |
00006   +----------------------------------------------------------------------+
00007   | This source file is subject to version 3.01 of the PHP license,      |
00008   | that is bundled with this package in the file LICENSE, and is        |
00009   | available through the world-wide-web at the following url:           |
00010   | http://www.php.net/license/3_01.txt                                  |
00011   | If you did not receive a copy of the PHP license and are unable to   |
00012   | obtain it through the world-wide-web, please send a note to          |
00013   | license@php.net so we can mail you a copy immediately.               |
00014   +----------------------------------------------------------------------+
00015   | Author: Sterling Hughes <sterling@php.net>                           |
00016   +----------------------------------------------------------------------+
00017 */
00018 
00019 /* $Id: php_simplexml.h 321634 2012-01-01 13:15:04Z felipe $ */
00020 
00021 #ifndef PHP_SIMPLEXML_H
00022 #define PHP_SIMPLEXML_H
00023 
00024 extern zend_module_entry simplexml_module_entry;
00025 #define phpext_simplexml_ptr &simplexml_module_entry
00026 
00027 #ifdef ZTS
00028 #include "TSRM.h"
00029 #endif
00030 
00031 #include "ext/libxml/php_libxml.h"
00032 #include <libxml/parser.h>
00033 #include <libxml/parserInternals.h>
00034 #include <libxml/tree.h>
00035 #include <libxml/uri.h>
00036 #include <libxml/xmlerror.h>
00037 #include <libxml/xinclude.h>
00038 #include <libxml/xpath.h>
00039 #include <libxml/xpathInternals.h>
00040 #include <libxml/xpointer.h>
00041 #include <libxml/xmlschemas.h>
00042 
00043 PHP_MINIT_FUNCTION(simplexml);
00044 PHP_MSHUTDOWN_FUNCTION(simplexml);
00045 #ifdef HAVE_SPL
00046 PHP_RINIT_FUNCTION(simplexml);
00047 #endif
00048 PHP_MINFO_FUNCTION(simplexml);
00049 
00050 typedef enum {
00051        SXE_ITER_NONE     = 0,
00052        SXE_ITER_ELEMENT  = 1,
00053        SXE_ITER_CHILD    = 2,
00054        SXE_ITER_ATTRLIST = 3
00055 } SXE_ITER;
00056 
00057 typedef struct {
00058        zend_object zo;
00059        php_libxml_node_ptr *node;
00060        php_libxml_ref_obj *document;
00061        HashTable *properties;
00062        xmlXPathContextPtr xpath;
00063        struct {
00064               xmlChar               *name;
00065               xmlChar               *nsprefix;
00066               int                   isprefix;
00067               SXE_ITER              type;
00068               zval                  *data;
00069        } iter;
00070        zval *tmp;
00071        zend_function *fptr_count;
00072 } php_sxe_object;
00073 
00074 #ifdef ZTS
00075 #define SIMPLEXML_G(v) TSRMG(simplexml_globals_id, zend_simplexml_globals *, v)
00076 #else
00077 #define SIMPLEXML_G(v) (simplexml_globals.v)
00078 #endif
00079 
00080 #ifdef PHP_WIN32
00081 #      ifdef PHP_SIMPLEXML_EXPORTS
00082 #             define PHP_SXE_API __declspec(dllexport)
00083 #      else
00084 #             define PHP_SXE_API __declspec(dllimport)
00085 #      endif
00086 #else
00087 #      define PHP_SXE_API ZEND_API
00088 #endif
00089 
00090 PHP_SXE_API zend_class_entry *sxe_get_element_class_entry();
00091 
00092 #endif
00093 
00094 /*
00095  * Local variables:
00096  * tab-width: 4
00097  * c-basic-offset: 4
00098  * indent-tabs-mode: t
00099  * End:
00100  * vim600: fdm=marker
00101  * vim: noet sw=4 ts=4
00102  */