You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
2.7 KiB

20 years ago
23 years ago
20 years ago
20 years ago
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 5 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2006 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 3.01 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available through the world-wide-web at the following url: |
  10. | http://www.php.net/license/3_01.txt |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Author: Sterling Hughes <sterling@php.net> |
  16. +----------------------------------------------------------------------+
  17. */
  18. /* $Id$ */
  19. #ifndef PHP_SIMPLEXML_H
  20. #define PHP_SIMPLEXML_H
  21. extern zend_module_entry simplexml_module_entry;
  22. #define phpext_simplexml_ptr &simplexml_module_entry
  23. #ifdef PHP_WIN32
  24. #define PHP_SIMPLEXML_API __declspec(dllexport)
  25. #else
  26. #define PHP_SIMPLEXML_API
  27. #endif
  28. #ifdef ZTS
  29. #include "TSRM.h"
  30. #endif
  31. #include "ext/libxml/php_libxml.h"
  32. #include <libxml/parser.h>
  33. #include <libxml/parserInternals.h>
  34. #include <libxml/tree.h>
  35. #include <libxml/uri.h>
  36. #include <libxml/xmlerror.h>
  37. #include <libxml/xinclude.h>
  38. #include <libxml/xpath.h>
  39. #include <libxml/xpathInternals.h>
  40. #include <libxml/xpointer.h>
  41. #include <libxml/xmlschemas.h>
  42. PHP_MINIT_FUNCTION(simplexml);
  43. PHP_MSHUTDOWN_FUNCTION(simplexml);
  44. #ifdef HAVE_SPL
  45. PHP_RINIT_FUNCTION(simplexml);
  46. #endif
  47. PHP_MINFO_FUNCTION(simplexml);
  48. typedef enum {
  49. SXE_ITER_NONE = 0,
  50. SXE_ITER_ELEMENT = 1,
  51. SXE_ITER_CHILD = 2,
  52. SXE_ITER_ATTRLIST = 3
  53. } SXE_ITER;
  54. typedef struct {
  55. zend_object zo;
  56. php_libxml_node_ptr *node;
  57. php_libxml_ref_obj *document;
  58. HashTable *properties;
  59. xmlXPathContextPtr xpath;
  60. struct {
  61. char *name;
  62. char *nsprefix;
  63. int isprefix;
  64. SXE_ITER type;
  65. zval *data;
  66. } iter;
  67. zval *tmp;
  68. } php_sxe_object;
  69. #ifdef ZTS
  70. #define SIMPLEXML_G(v) TSRMG(simplexml_globals_id, zend_simplexml_globals *, v)
  71. #else
  72. #define SIMPLEXML_G(v) (simplexml_globals.v)
  73. #endif
  74. ZEND_API zend_class_entry *sxe_get_element_class_entry();
  75. #endif
  76. /*
  77. * Local variables:
  78. * tab-width: 4
  79. * c-basic-offset: 4
  80. * indent-tabs-mode: t
  81. * End:
  82. * vim600: fdm=marker
  83. * vim: noet sw=4 ts=4
  84. */