1999-11-24 06:21:48 +00:00
|
|
|
/*
|
|
|
|
+----------------------------------------------------------------------+
|
2001-12-11 15:32:16 +00:00
|
|
|
| PHP Version 4 |
|
1999-11-24 06:21:48 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2001-12-11 15:32:16 +00:00
|
|
|
| Copyright (c) 1997-2002 The PHP Group |
|
1999-11-24 06:21:48 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2000-07-24 01:40:02 +00:00
|
|
|
| This source file is subject to version 2.02 of the PHP license, |
|
|
|
|
| that is bundled with this package in the file LICENSE, and is |
|
|
|
|
| available at through the world-wide-web at |
|
|
|
|
| http://www.php.net/license/2_02.txt. |
|
|
|
|
| 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. |
|
1999-11-24 06:21:48 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2002-02-28 08:29:35 +00:00
|
|
|
| Author: Uwe Steinmann (Uwe.Steinmann@fernuni-hagen.de |
|
1999-11-24 06:21:48 +00:00
|
|
|
+----------------------------------------------------------------------+
|
2000-07-24 01:40:02 +00:00
|
|
|
*/
|
1999-11-24 06:21:48 +00:00
|
|
|
|
|
|
|
/* $Id$ */
|
|
|
|
|
2000-07-02 23:46:51 +00:00
|
|
|
#ifndef PHP_DOMXML_H
|
|
|
|
#define PHP_DOMXML_H
|
1999-11-24 06:21:48 +00:00
|
|
|
|
|
|
|
#if HAVE_DOMXML
|
2000-06-05 15:39:29 +00:00
|
|
|
#include <libxml/parser.h>
|
2002-06-25 09:19:20 +00:00
|
|
|
#include <libxml/parserInternals.h>
|
2002-01-08 00:31:26 +00:00
|
|
|
#include <libxml/tree.h>
|
2002-01-09 03:42:30 +00:00
|
|
|
#include <libxml/xmlerror.h>
|
2002-01-08 00:31:26 +00:00
|
|
|
#if defined(LIBXML_HTML_ENABLED)
|
|
|
|
#include <libxml/HTMLparser.h>
|
|
|
|
#include <libxml/HTMLtree.h>
|
|
|
|
#endif
|
2000-12-09 03:19:46 +00:00
|
|
|
#if defined(LIBXML_XPATH_ENABLED)
|
2000-11-09 08:42:20 +00:00
|
|
|
#include <libxml/xpath.h>
|
2002-01-13 01:17:34 +00:00
|
|
|
#include <libxml/xpathInternals.h>
|
2000-12-09 03:19:46 +00:00
|
|
|
#endif
|
2000-11-09 08:42:20 +00:00
|
|
|
#if defined(LIBXML_XPTR_ENABLED)
|
|
|
|
#include <libxml/xpointer.h>
|
|
|
|
#endif
|
2002-01-08 00:31:26 +00:00
|
|
|
#if HAVE_DOMXSLT
|
2002-01-10 01:53:22 +00:00
|
|
|
#include <libxslt/xsltconfig.h>
|
2002-01-08 00:31:26 +00:00
|
|
|
#include <libxslt/xsltInternals.h>
|
|
|
|
#include <libxslt/xsltutils.h>
|
|
|
|
#include <libxslt/transform.h>
|
2002-01-18 07:58:47 +00:00
|
|
|
#if HAVE_DOMEXSLT
|
|
|
|
#include <libexslt/exslt.h>
|
|
|
|
#include <libexslt/exsltconfig.h>
|
|
|
|
#endif
|
2002-01-08 00:31:26 +00:00
|
|
|
#endif
|
1999-11-24 06:21:48 +00:00
|
|
|
|
2002-05-31 05:58:40 +00:00
|
|
|
/* DOMXML API_VERSION, please bump it up, if you change anything in the API
|
|
|
|
therefore it's easier for the script-programmers to check, what's working how
|
|
|
|
Can be checked with phpversion("domxml");
|
|
|
|
*/
|
2002-06-13 10:47:19 +00:00
|
|
|
#define DOMXML_API_VERSION "20020713"
|
2002-05-31 05:58:40 +00:00
|
|
|
|
2000-08-07 11:55:48 +00:00
|
|
|
extern zend_module_entry domxml_module_entry;
|
|
|
|
#define domxml_module_ptr &domxml_module_entry
|
1999-11-24 06:21:48 +00:00
|
|
|
|
2002-05-31 13:38:58 +00:00
|
|
|
#ifdef PHP_WIN32
|
|
|
|
#ifdef PHPAPI
|
|
|
|
#undef PHPAPI
|
|
|
|
#endif
|
|
|
|
#ifdef DOMXML_EXPORTS
|
|
|
|
#define PHPAPI __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
#define PHPAPI __declspec(dllimport)
|
|
|
|
#endif /* DOMXML_EXPORTS */
|
|
|
|
#endif /* PHP_WIN32 */
|
|
|
|
|
2002-05-31 05:58:40 +00:00
|
|
|
PHPAPI zval *php_domobject_new(xmlNodePtr obj, int *found, zval* in TSRMLS_DC);
|
|
|
|
|
1999-11-24 06:21:48 +00:00
|
|
|
/* directory functions */
|
2001-07-30 01:56:43 +00:00
|
|
|
PHP_MINIT_FUNCTION(domxml);
|
|
|
|
PHP_RINIT_FUNCTION(domxml);
|
|
|
|
PHP_MINFO_FUNCTION(domxml);
|
2001-04-09 11:53:06 +00:00
|
|
|
PHP_FUNCTION(domxml_version);
|
2000-02-10 15:24:13 +00:00
|
|
|
PHP_FUNCTION(xmldoc);
|
|
|
|
PHP_FUNCTION(xmldocfile);
|
2002-01-08 00:31:26 +00:00
|
|
|
#if defined(LIBXML_HTML_ENABLED)
|
2002-01-08 19:13:42 +00:00
|
|
|
PHP_FUNCTION(html_doc);
|
|
|
|
PHP_FUNCTION(html_doc_file);
|
2002-01-08 00:31:26 +00:00
|
|
|
#endif
|
2002-04-12 11:47:48 +00:00
|
|
|
PHP_FUNCTION(domxml_xmltree);
|
2000-02-17 15:05:24 +00:00
|
|
|
PHP_FUNCTION(domxml_new_xmldoc);
|
2002-01-21 23:21:32 +00:00
|
|
|
PHP_FUNCTION(domxml_substitute_entities_default);
|
1999-11-24 06:21:48 +00:00
|
|
|
|
|
|
|
/* Class Document methods */
|
2001-03-20 15:01:13 +00:00
|
|
|
PHP_FUNCTION(domxml_doc_doctype);
|
|
|
|
PHP_FUNCTION(domxml_doc_implementation);
|
|
|
|
PHP_FUNCTION(domxml_doc_create_element);
|
|
|
|
PHP_FUNCTION(domxml_doc_create_text_node);
|
|
|
|
PHP_FUNCTION(domxml_doc_create_comment);
|
|
|
|
PHP_FUNCTION(domxml_doc_create_processing_instruction);
|
|
|
|
PHP_FUNCTION(domxml_doc_create_attribute);
|
2001-11-21 17:01:19 +00:00
|
|
|
PHP_FUNCTION(domxml_doc_create_cdata_section);
|
|
|
|
PHP_FUNCTION(domxml_doc_create_entity_reference);
|
2001-03-21 05:45:40 +00:00
|
|
|
PHP_FUNCTION(domxml_doc_imported_node);
|
2002-05-16 21:59:26 +00:00
|
|
|
PHP_FUNCTION(domxml_doc_add_root);
|
|
|
|
PHP_FUNCTION(domxml_doc_document_element);
|
|
|
|
PHP_FUNCTION(domxml_doc_set_root);
|
1999-11-24 06:21:48 +00:00
|
|
|
PHP_FUNCTION(domxml_intdtd);
|
2002-04-23 06:26:46 +00:00
|
|
|
PHP_FUNCTION(domxml_doc_ids);
|
2002-01-18 07:58:47 +00:00
|
|
|
PHP_FUNCTION(domxml_dump_mem);
|
|
|
|
PHP_FUNCTION(domxml_dump_mem_file);
|
2002-01-18 12:40:12 +00:00
|
|
|
PHP_FUNCTION(domxml_dump_node);
|
2002-06-13 09:05:56 +00:00
|
|
|
PHP_FUNCTION(domxml_doc_validate);
|
2002-01-08 00:31:26 +00:00
|
|
|
#if defined(LIBXML_HTML_ENABLED)
|
2002-01-08 19:13:42 +00:00
|
|
|
PHP_FUNCTION(domxml_html_dump_mem);
|
2002-01-08 00:31:26 +00:00
|
|
|
#endif
|
1999-11-24 06:21:48 +00:00
|
|
|
|
2001-03-20 15:01:13 +00:00
|
|
|
/* Class DocumentType methods */
|
|
|
|
PHP_FUNCTION(domxml_doctype_name);
|
|
|
|
PHP_FUNCTION(domxml_doctype_entities);
|
|
|
|
PHP_FUNCTION(domxml_doctype_notations);
|
|
|
|
PHP_FUNCTION(domxml_doctype_public_id);
|
|
|
|
PHP_FUNCTION(domxml_doctype_system_id);
|
|
|
|
PHP_FUNCTION(domxml_doctype_internal_subset);
|
|
|
|
|
2001-03-21 05:45:40 +00:00
|
|
|
/* Class Notation methods */
|
|
|
|
PHP_FUNCTION(domxml_notation_public_id);
|
|
|
|
PHP_FUNCTION(domxml_notation_system_id);
|
|
|
|
|
1999-11-24 06:21:48 +00:00
|
|
|
/* Class Node methods */
|
2001-03-20 15:01:13 +00:00
|
|
|
PHP_FUNCTION(domxml_node_attributes);
|
|
|
|
PHP_FUNCTION(domxml_node_children);
|
|
|
|
PHP_FUNCTION(domxml_node_first_child);
|
|
|
|
PHP_FUNCTION(domxml_node_last_child);
|
|
|
|
PHP_FUNCTION(domxml_node_next_sibling);
|
|
|
|
PHP_FUNCTION(domxml_node_previous_sibling);
|
|
|
|
PHP_FUNCTION(domxml_node_owner_document);
|
|
|
|
PHP_FUNCTION(domxml_node_insert_before);
|
2002-04-13 10:23:46 +00:00
|
|
|
PHP_FUNCTION(domxml_node_append_sibling);
|
2001-03-20 15:01:13 +00:00
|
|
|
PHP_FUNCTION(domxml_node_append_child);
|
2002-04-12 13:23:07 +00:00
|
|
|
PHP_FUNCTION(domxml_node_remove_child);
|
2002-04-15 14:45:38 +00:00
|
|
|
PHP_FUNCTION(domxml_node_replace_child);
|
2001-03-20 15:01:13 +00:00
|
|
|
PHP_FUNCTION(domxml_node_has_attributes);
|
|
|
|
PHP_FUNCTION(domxml_node_has_child_nodes);
|
|
|
|
PHP_FUNCTION(domxml_node_parent);
|
|
|
|
PHP_FUNCTION(domxml_node_prefix);
|
2002-07-07 17:19:29 +00:00
|
|
|
PHP_FUNCTION(domxml_node_namespace_uri);
|
2000-01-25 17:00:09 +00:00
|
|
|
PHP_FUNCTION(domxml_node);
|
2001-11-21 17:01:19 +00:00
|
|
|
PHP_FUNCTION(domxml_clone_node);
|
2001-03-20 15:01:13 +00:00
|
|
|
PHP_FUNCTION(domxml_node_unlink_node);
|
2002-01-11 21:15:46 +00:00
|
|
|
PHP_FUNCTION(domxml_node_replace_node);
|
2001-03-20 15:01:13 +00:00
|
|
|
PHP_FUNCTION(domxml_node_new_child);
|
|
|
|
PHP_FUNCTION(domxml_node_set_content);
|
2002-01-18 11:04:10 +00:00
|
|
|
PHP_FUNCTION(domxml_node_get_content);
|
2001-03-20 15:01:13 +00:00
|
|
|
PHP_FUNCTION(domxml_node_text_concat);
|
|
|
|
PHP_FUNCTION(domxml_node_set_name);
|
|
|
|
PHP_FUNCTION(domxml_node_name);
|
2001-11-21 17:01:19 +00:00
|
|
|
PHP_FUNCTION(domxml_node_type);
|
2001-03-20 15:01:13 +00:00
|
|
|
PHP_FUNCTION(domxml_node_value);
|
2001-11-21 17:01:19 +00:00
|
|
|
PHP_FUNCTION(domxml_is_blank_node);
|
1999-11-24 06:21:48 +00:00
|
|
|
|
|
|
|
/* Class Attribute methods */
|
2001-03-20 15:01:13 +00:00
|
|
|
PHP_FUNCTION(domxml_attr_name);
|
|
|
|
PHP_FUNCTION(domxml_attr_value);
|
|
|
|
PHP_FUNCTION(domxml_attr_specified);
|
|
|
|
|
|
|
|
/* Class Element methods */
|
|
|
|
PHP_FUNCTION(domxml_elem_tagname);
|
|
|
|
PHP_FUNCTION(domxml_elem_get_attribute);
|
|
|
|
PHP_FUNCTION(domxml_elem_set_attribute);
|
|
|
|
PHP_FUNCTION(domxml_elem_remove_attribute);
|
|
|
|
PHP_FUNCTION(domxml_elem_get_attribute_node);
|
2002-07-01 14:48:38 +00:00
|
|
|
/* since this function is not really implemented, outcomment it for the time beeing
|
2001-03-20 15:01:13 +00:00
|
|
|
PHP_FUNCTION(domxml_elem_set_attribute_node);
|
2002-07-01 14:48:38 +00:00
|
|
|
*/
|
2002-03-11 22:37:32 +00:00
|
|
|
PHP_FUNCTION(domxml_elem_get_elements_by_tagname);
|
2002-04-12 11:32:23 +00:00
|
|
|
PHP_FUNCTION(domxml_elem_has_attribute);
|
2001-03-20 15:01:13 +00:00
|
|
|
/* Class CData methods */
|
|
|
|
PHP_FUNCTION(domxml_cdata_length);
|
|
|
|
|
|
|
|
/* Class Notation methods */
|
|
|
|
PHP_FUNCTION(domxml_notation_public_id);
|
|
|
|
PHP_FUNCTION(domxml_notation_system_id);
|
|
|
|
|
|
|
|
/* Class Entity methods */
|
|
|
|
PHP_FUNCTION(domxml_entity_public_id);
|
|
|
|
PHP_FUNCTION(domxml_entity_system_id);
|
|
|
|
PHP_FUNCTION(domxml_entity_notation_name);
|
|
|
|
|
|
|
|
/* Class ProcessingInstructions */
|
|
|
|
PHP_FUNCTION(domxml_pi_target);
|
|
|
|
PHP_FUNCTION(domxml_pi_data);
|
1999-11-24 06:21:48 +00:00
|
|
|
|
2002-04-05 15:27:52 +00:00
|
|
|
/* Class Parser methods */
|
|
|
|
PHP_FUNCTION(domxml_parser);
|
|
|
|
PHP_FUNCTION(domxml_parser_add_chunk);
|
|
|
|
PHP_FUNCTION(domxml_parser_end);
|
2002-04-30 05:18:12 +00:00
|
|
|
PHP_FUNCTION(domxml_parser_set_keep_blanks);
|
2002-06-14 12:12:04 +00:00
|
|
|
PHP_FUNCTION(domxml_parser_start_element);
|
|
|
|
PHP_FUNCTION(domxml_parser_end_element);
|
|
|
|
PHP_FUNCTION(domxml_parser_characters);
|
2002-06-14 12:37:28 +00:00
|
|
|
PHP_FUNCTION(domxml_parser_entity_reference);
|
2002-06-14 12:12:04 +00:00
|
|
|
PHP_FUNCTION(domxml_parser_comment);
|
2002-06-14 12:37:28 +00:00
|
|
|
PHP_FUNCTION(domxml_parser_cdata_section);
|
|
|
|
PHP_FUNCTION(domxml_parser_namespace_decl);
|
|
|
|
PHP_FUNCTION(domxml_parser_processing_instruction);
|
2002-06-14 12:12:04 +00:00
|
|
|
PHP_FUNCTION(domxml_parser_start_document);
|
|
|
|
PHP_FUNCTION(domxml_parser_end_document);
|
|
|
|
PHP_FUNCTION(domxml_parser_get_document);
|
2002-04-05 15:27:52 +00:00
|
|
|
|
2000-11-09 08:42:20 +00:00
|
|
|
/* Class XPathContext methods */
|
2000-12-09 03:19:46 +00:00
|
|
|
#if defined(LIBXML_XPATH_ENABLED)
|
2000-11-09 08:42:20 +00:00
|
|
|
PHP_FUNCTION(xpath_init);
|
|
|
|
PHP_FUNCTION(xpath_new_context);
|
|
|
|
PHP_FUNCTION(xpath_eval);
|
|
|
|
PHP_FUNCTION(xpath_eval_expression);
|
2002-01-13 01:17:34 +00:00
|
|
|
PHP_FUNCTION(xpath_register_ns);
|
2002-03-11 22:37:32 +00:00
|
|
|
PHP_FUNCTION(domxml_doc_get_elements_by_tagname);
|
|
|
|
PHP_FUNCTION(domxml_doc_get_element_by_id);
|
2000-12-09 03:19:46 +00:00
|
|
|
#endif
|
2000-11-09 08:42:20 +00:00
|
|
|
#if defined(LIBXML_XPTR_ENABLED)
|
|
|
|
PHP_FUNCTION(xptr_new_context);
|
2000-11-10 06:09:41 +00:00
|
|
|
PHP_FUNCTION(xptr_eval);
|
2000-11-09 08:42:20 +00:00
|
|
|
#endif
|
2000-03-02 16:39:50 +00:00
|
|
|
PHP_FUNCTION(domxml_test);
|
2001-12-01 19:42:34 +00:00
|
|
|
|
2002-01-08 00:31:26 +00:00
|
|
|
/* DOMXSLT functions */
|
|
|
|
#if HAVE_DOMXSLT
|
2002-01-17 01:13:39 +00:00
|
|
|
PHP_FUNCTION(domxml_xslt_stylesheet);
|
|
|
|
PHP_FUNCTION(domxml_xslt_stylesheet_doc);
|
|
|
|
PHP_FUNCTION(domxml_xslt_stylesheet_file);
|
2002-01-08 00:31:26 +00:00
|
|
|
PHP_FUNCTION(domxml_xslt_process);
|
2002-01-17 01:13:39 +00:00
|
|
|
PHP_FUNCTION(domxml_xslt_version);
|
2002-01-08 00:31:26 +00:00
|
|
|
#endif
|
2002-06-13 09:05:56 +00:00
|
|
|
typedef struct {
|
|
|
|
zval *errors;
|
|
|
|
xmlValidCtxtPtr valid;
|
|
|
|
xmlParserCtxtPtr parser;
|
|
|
|
} domxml_ErrorCtxt;
|
1999-11-24 06:21:48 +00:00
|
|
|
#else
|
2000-08-07 11:55:48 +00:00
|
|
|
#define domxml_module_ptr NULL
|
2002-06-13 09:05:56 +00:00
|
|
|
|
1999-11-24 06:21:48 +00:00
|
|
|
#endif /* HAVE_DOMXML */
|
2000-08-07 11:55:48 +00:00
|
|
|
#define phpext_domxml_ptr domxml_module_ptr
|
1999-11-24 06:21:48 +00:00
|
|
|
|
2000-02-26 03:20:55 +00:00
|
|
|
#endif /* _PHP_DIR_H */
|