2003-05-18 20:33:26 +00:00
|
|
|
/*
|
|
|
|
+----------------------------------------------------------------------+
|
2003-12-09 16:29:54 +00:00
|
|
|
| PHP Version 5 |
|
2003-05-18 20:33:26 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2007-12-31 07:17:19 +00:00
|
|
|
| Copyright (c) 1997-2008 The PHP Group |
|
2003-05-18 20:33:26 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2006-01-01 12:51:34 +00:00
|
|
|
| This source file is subject to version 3.01 of the PHP license, |
|
2003-05-18 20:33:26 +00:00
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
2003-12-09 16:29:54 +00:00
|
|
|
| available through the world-wide-web at the following url: |
|
2006-01-01 12:51:34 +00:00
|
|
|
| http://www.php.net/license/3_01.txt |
|
2003-05-18 20:33:26 +00: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-26 16:00:58 +00:00
|
|
|
#include "ext/libxml/php_libxml.h"
|
2003-05-18 20:33:26 +00: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-27 22:15:17 +00:00
|
|
|
#include <libxml/xmlschemas.h>
|
2003-05-18 20:33:26 +00:00
|
|
|
|
|
|
|
PHP_MINIT_FUNCTION(simplexml);
|
2004-02-13 00:02:19 +00:00
|
|
|
PHP_MSHUTDOWN_FUNCTION(simplexml);
|
2005-06-30 11:15:00 +00:00
|
|
|
#ifdef HAVE_SPL
|
2003-05-18 20:33:26 +00:00
|
|
|
PHP_RINIT_FUNCTION(simplexml);
|
2004-01-09 06:12:29 +00:00
|
|
|
#endif
|
2003-05-18 20:33:26 +00:00
|
|
|
PHP_MINFO_FUNCTION(simplexml);
|
|
|
|
|
2006-02-26 23:14:45 +00:00
|
|
|
typedef enum {
|
|
|
|
SXE_ITER_NONE = 0,
|
|
|
|
SXE_ITER_ELEMENT = 1,
|
|
|
|
SXE_ITER_CHILD = 2,
|
|
|
|
SXE_ITER_ATTRLIST = 3
|
|
|
|
} SXE_ITER;
|
|
|
|
|
2003-05-18 20:33:26 +00:00
|
|
|
typedef struct {
|
|
|
|
zend_object zo;
|
2003-10-26 16:00:58 +00:00
|
|
|
php_libxml_node_ptr *node;
|
|
|
|
php_libxml_ref_obj *document;
|
2003-10-25 21:08:33 +00:00
|
|
|
HashTable *properties;
|
2003-10-26 16:00:58 +00:00
|
|
|
xmlXPathContextPtr xpath;
|
2003-11-23 16:20:58 +00:00
|
|
|
struct {
|
2006-08-07 10:09:52 +00:00
|
|
|
xmlChar *name;
|
|
|
|
xmlChar *nsprefix;
|
2006-05-23 22:24:44 +00:00
|
|
|
int isprefix;
|
2006-02-26 23:14:45 +00:00
|
|
|
SXE_ITER type;
|
2003-11-23 16:20:58 +00:00
|
|
|
zval *data;
|
|
|
|
} iter;
|
2006-02-26 23:14:45 +00:00
|
|
|
zval *tmp;
|
2008-07-09 21:27:28 +00:00
|
|
|
zend_function *fptr_count;
|
2003-05-18 20:33:26 +00: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
|
|
|
|
|
2004-01-18 15:16:26 +00:00
|
|
|
ZEND_API zend_class_entry *sxe_get_element_class_entry();
|
2004-01-18 13:19:41 +00:00
|
|
|
|
2003-05-18 20:33:26 +00: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
|
|
|
|
*/
|