2003-05-19 04:33:26 +08:00
|
|
|
/*
|
|
|
|
+----------------------------------------------------------------------+
|
2003-12-10 00:29:54 +08:00
|
|
|
| PHP Version 5 |
|
2003-05-19 04:33:26 +08:00
|
|
|
+----------------------------------------------------------------------+
|
2014-01-03 11:04:26 +08:00
|
|
|
| Copyright (c) 1997-2014 The PHP Group |
|
2003-05-19 04:33:26 +08:00
|
|
|
+----------------------------------------------------------------------+
|
2006-01-01 20:51:34 +08:00
|
|
|
| This source file is subject to version 3.01 of the PHP license, |
|
2003-05-19 04:33:26 +08:00
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
2003-12-10 00:29:54 +08:00
|
|
|
| available through the world-wide-web at the following url: |
|
2006-01-01 20:51:34 +08:00
|
|
|
| http://www.php.net/license/3_01.txt |
|
2003-05-19 04:33:26 +08:00
|
|
|
| If you did not receive a copy of the PHP license and are unable to |
|
|
|
|
| obtain it through the world-wide-web, please send a note to |
|
|
|
|
| license@php.net so we can mail you a copy immediately. |
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
| Author: Sterling Hughes <sterling@php.net> |
|
|
|
|
+----------------------------------------------------------------------+
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
|
|
|
#ifndef PHP_SIMPLEXML_H
|
|
|
|
#define PHP_SIMPLEXML_H
|
|
|
|
|
|
|
|
extern zend_module_entry simplexml_module_entry;
|
|
|
|
#define phpext_simplexml_ptr &simplexml_module_entry
|
|
|
|
|
|
|
|
#ifdef ZTS
|
|
|
|
#include "TSRM.h"
|
|
|
|
#endif
|
|
|
|
|
2003-10-27 00:00:58 +08:00
|
|
|
#include "ext/libxml/php_libxml.h"
|
2003-05-19 04:33:26 +08:00
|
|
|
#include <libxml/parser.h>
|
|
|
|
#include <libxml/parserInternals.h>
|
|
|
|
#include <libxml/tree.h>
|
|
|
|
#include <libxml/uri.h>
|
|
|
|
#include <libxml/xmlerror.h>
|
|
|
|
#include <libxml/xinclude.h>
|
|
|
|
#include <libxml/xpath.h>
|
|
|
|
#include <libxml/xpathInternals.h>
|
|
|
|
#include <libxml/xpointer.h>
|
2003-05-28 06:15:17 +08:00
|
|
|
#include <libxml/xmlschemas.h>
|
2003-05-19 04:33:26 +08:00
|
|
|
|
|
|
|
PHP_MINIT_FUNCTION(simplexml);
|
2004-02-13 08:02:19 +08:00
|
|
|
PHP_MSHUTDOWN_FUNCTION(simplexml);
|
2005-06-30 19:15:00 +08:00
|
|
|
#ifdef HAVE_SPL
|
2003-05-19 04:33:26 +08:00
|
|
|
PHP_RINIT_FUNCTION(simplexml);
|
2004-01-09 14:12:29 +08:00
|
|
|
#endif
|
2003-05-19 04:33:26 +08:00
|
|
|
PHP_MINFO_FUNCTION(simplexml);
|
|
|
|
|
2006-02-27 07:14:45 +08:00
|
|
|
typedef enum {
|
|
|
|
SXE_ITER_NONE = 0,
|
|
|
|
SXE_ITER_ELEMENT = 1,
|
|
|
|
SXE_ITER_CHILD = 2,
|
|
|
|
SXE_ITER_ATTRLIST = 3
|
|
|
|
} SXE_ITER;
|
|
|
|
|
2003-05-19 04:33:26 +08:00
|
|
|
typedef struct {
|
|
|
|
zend_object zo;
|
2003-10-27 00:00:58 +08:00
|
|
|
php_libxml_node_ptr *node;
|
|
|
|
php_libxml_ref_obj *document;
|
2003-10-26 05:08:33 +08:00
|
|
|
HashTable *properties;
|
2003-10-27 00:00:58 +08:00
|
|
|
xmlXPathContextPtr xpath;
|
2003-11-24 00:20:58 +08:00
|
|
|
struct {
|
2006-08-07 18:09:52 +08:00
|
|
|
xmlChar *name;
|
|
|
|
xmlChar *nsprefix;
|
2006-05-24 06:24:44 +08:00
|
|
|
int isprefix;
|
2006-02-27 07:14:45 +08:00
|
|
|
SXE_ITER type;
|
2003-11-24 00:20:58 +08:00
|
|
|
zval *data;
|
|
|
|
} iter;
|
2006-02-27 07:14:45 +08:00
|
|
|
zval *tmp;
|
2008-07-10 05:27:28 +08:00
|
|
|
zend_function *fptr_count;
|
2003-05-19 04:33:26 +08:00
|
|
|
} php_sxe_object;
|
|
|
|
|
|
|
|
#ifdef ZTS
|
|
|
|
#define SIMPLEXML_G(v) TSRMG(simplexml_globals_id, zend_simplexml_globals *, v)
|
|
|
|
#else
|
|
|
|
#define SIMPLEXML_G(v) (simplexml_globals.v)
|
|
|
|
#endif
|
|
|
|
|
2008-12-27 20:22:38 +08:00
|
|
|
#ifdef PHP_WIN32
|
|
|
|
# ifdef PHP_SIMPLEXML_EXPORTS
|
|
|
|
# define PHP_SXE_API __declspec(dllexport)
|
|
|
|
# else
|
|
|
|
# define PHP_SXE_API __declspec(dllimport)
|
|
|
|
# endif
|
|
|
|
#else
|
|
|
|
# define PHP_SXE_API ZEND_API
|
|
|
|
#endif
|
2008-12-27 04:28:43 +08:00
|
|
|
|
|
|
|
PHP_SXE_API zend_class_entry *sxe_get_element_class_entry();
|
2004-01-18 21:19:41 +08:00
|
|
|
|
2003-05-19 04:33:26 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Local variables:
|
|
|
|
* tab-width: 4
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* indent-tabs-mode: t
|
|
|
|
* End:
|
|
|
|
* vim600: fdm=marker
|
|
|
|
* vim: noet sw=4 ts=4
|
|
|
|
*/
|