php_simplexml.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 5 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2016 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 ZTS
  24. #include "TSRM.h"
  25. #endif
  26. #include "ext/libxml/php_libxml.h"
  27. #include <libxml/parser.h>
  28. #include <libxml/parserInternals.h>
  29. #include <libxml/tree.h>
  30. #include <libxml/uri.h>
  31. #include <libxml/xmlerror.h>
  32. #include <libxml/xinclude.h>
  33. #include <libxml/xpath.h>
  34. #include <libxml/xpathInternals.h>
  35. #include <libxml/xpointer.h>
  36. #include <libxml/xmlschemas.h>
  37. PHP_MINIT_FUNCTION(simplexml);
  38. PHP_MSHUTDOWN_FUNCTION(simplexml);
  39. #ifdef HAVE_SPL
  40. PHP_RINIT_FUNCTION(simplexml);
  41. #endif
  42. PHP_MINFO_FUNCTION(simplexml);
  43. typedef enum {
  44. SXE_ITER_NONE = 0,
  45. SXE_ITER_ELEMENT = 1,
  46. SXE_ITER_CHILD = 2,
  47. SXE_ITER_ATTRLIST = 3
  48. } SXE_ITER;
  49. typedef struct {
  50. zend_object zo;
  51. php_libxml_node_ptr *node;
  52. php_libxml_ref_obj *document;
  53. HashTable *properties;
  54. xmlXPathContextPtr xpath;
  55. struct {
  56. xmlChar *name;
  57. xmlChar *nsprefix;
  58. int isprefix;
  59. SXE_ITER type;
  60. zval *data;
  61. } iter;
  62. zval *tmp;
  63. zend_function *fptr_count;
  64. } php_sxe_object;
  65. #ifdef ZTS
  66. #define SIMPLEXML_G(v) TSRMG(simplexml_globals_id, zend_simplexml_globals *, v)
  67. #else
  68. #define SIMPLEXML_G(v) (simplexml_globals.v)
  69. #endif
  70. #ifdef PHP_WIN32
  71. # ifdef PHP_SIMPLEXML_EXPORTS
  72. # define PHP_SXE_API __declspec(dllexport)
  73. # else
  74. # define PHP_SXE_API __declspec(dllimport)
  75. # endif
  76. #else
  77. # define PHP_SXE_API ZEND_API
  78. #endif
  79. PHP_SXE_API zend_class_entry *sxe_get_element_class_entry();
  80. #endif
  81. /*
  82. * Local variables:
  83. * tab-width: 4
  84. * c-basic-offset: 4
  85. * indent-tabs-mode: t
  86. * End:
  87. * vim600: fdm=marker
  88. * vim: noet sw=4 ts=4
  89. */