php_simplexml.h 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Copyright (c) The PHP Group |
  4. +----------------------------------------------------------------------+
  5. | This source file is subject to version 3.01 of the PHP license, |
  6. | that is bundled with this package in the file LICENSE, and is |
  7. | available through the world-wide-web at the following url: |
  8. | https://www.php.net/license/3_01.txt |
  9. | If you did not receive a copy of the PHP license and are unable to |
  10. | obtain it through the world-wide-web, please send a note to |
  11. | license@php.net so we can mail you a copy immediately. |
  12. +----------------------------------------------------------------------+
  13. | Author: Sterling Hughes <sterling@php.net> |
  14. +----------------------------------------------------------------------+
  15. */
  16. #ifndef PHP_SIMPLEXML_H
  17. #define PHP_SIMPLEXML_H
  18. extern zend_module_entry simplexml_module_entry;
  19. #define phpext_simplexml_ptr &simplexml_module_entry
  20. #include "php_version.h"
  21. #define PHP_SIMPLEXML_VERSION PHP_VERSION
  22. #ifdef ZTS
  23. #include "TSRM.h"
  24. #endif
  25. #include "ext/libxml/php_libxml.h"
  26. #include <libxml/parser.h>
  27. #include <libxml/parserInternals.h>
  28. #include <libxml/tree.h>
  29. #include <libxml/uri.h>
  30. #include <libxml/xmlerror.h>
  31. #include <libxml/xinclude.h>
  32. #include <libxml/xpath.h>
  33. #include <libxml/xpathInternals.h>
  34. #include <libxml/xpointer.h>
  35. #include <libxml/xmlschemas.h>
  36. PHP_MINIT_FUNCTION(simplexml);
  37. PHP_MSHUTDOWN_FUNCTION(simplexml);
  38. PHP_MINFO_FUNCTION(simplexml);
  39. typedef enum {
  40. SXE_ITER_NONE = 0,
  41. SXE_ITER_ELEMENT = 1,
  42. SXE_ITER_CHILD = 2,
  43. SXE_ITER_ATTRLIST = 3
  44. } SXE_ITER;
  45. typedef struct {
  46. php_libxml_node_ptr *node;
  47. php_libxml_ref_obj *document;
  48. HashTable *properties;
  49. xmlXPathContextPtr xpath;
  50. struct {
  51. xmlChar *name;
  52. xmlChar *nsprefix;
  53. int isprefix;
  54. SXE_ITER type;
  55. zval data;
  56. } iter;
  57. zval tmp;
  58. zend_function *fptr_count;
  59. zend_object zo;
  60. } php_sxe_object;
  61. #ifdef PHP_WIN32
  62. # ifdef PHP_SIMPLEXML_EXPORTS
  63. # define PHP_SXE_API __declspec(dllexport)
  64. # else
  65. # define PHP_SXE_API __declspec(dllimport)
  66. # endif
  67. #else
  68. # define PHP_SXE_API ZEND_API
  69. #endif
  70. extern PHP_SXE_API zend_class_entry *ce_SimpleXMLIterator;
  71. extern PHP_SXE_API zend_class_entry *ce_SimpleXMLElement;
  72. PHP_SXE_API zend_class_entry *sxe_get_element_class_entry(void);
  73. #endif