From f26a523d673da6eea3822d91ab2817737b05824b Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Wed, 11 Jul 2007 02:23:16 +0000 Subject: Add Element. Fix Attr's get_schema_type_info to have the right name. svn path=/trunk/dom/; revision=3400 --- include/dom/core/attr.h | 2 +- include/dom/core/element.h | 78 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 include/dom/core/element.h (limited to 'include/dom/core') diff --git a/include/dom/core/attr.h b/include/dom/core/attr.h index 87adfc6..6de0b28 100644 --- a/include/dom/core/attr.h +++ b/include/dom/core/attr.h @@ -27,7 +27,7 @@ dom_exception dom_attr_set_value(struct dom_attr *attr, struct dom_string *value); dom_exception dom_attr_get_owner(struct dom_attr *attr, struct dom_element **result); -dom_exception dom_attr_get_type_info(struct dom_attr *attr, +dom_exception dom_attr_get_schema_type_info(struct dom_attr *attr, struct dom_type_info **result); dom_exception dom_attr_is_id(struct dom_attr *attr, bool *result); diff --git a/include/dom/core/element.h b/include/dom/core/element.h new file mode 100644 index 0000000..6ae8b4d --- /dev/null +++ b/include/dom/core/element.h @@ -0,0 +1,78 @@ +/* + * This file is part of libdom. + * Licensed under the MIT License, + * http://www.opensource.org/licenses/mit-license.php + * Copyright 2007 John-Mark Bell + */ + +#ifndef dom_core_element_h_ +#define dom_core_element_h_ + +#include + +#include + +struct dom_attr; +struct dom_element; +struct dom_nodelist; +struct dom_string; +struct dom_type_info; + +dom_exception dom_element_get_tag_name(struct dom_element *element, + struct dom_string **name); + +dom_exception dom_element_get_attribute(struct dom_element *element, + struct dom_string *name, struct dom_string **value); +dom_exception dom_element_set_attribute(struct dom_element *element, + struct dom_string *name, struct dom_string *value); +dom_exception dom_element_remove_attribute(struct dom_element *element, + struct dom_string *name); + +dom_exception dom_element_get_attribute_node(struct dom_element *element, + struct dom_string *name, struct dom_attr **result); +dom_exception dom_element_set_attribute_node(struct dom_element *element, + struct dom_attr *attr, struct dom_attr **result); +dom_exception dom_element_remove_attribute_node(struct dom_element *element, + struct dom_attr *attr, struct dom_attr **result); + +dom_exception dom_element_get_elements_by_tag_name( + struct dom_element *element, struct dom_string *name, + struct dom_nodelist **result); + +dom_exception dom_element_get_attribute_ns(struct dom_element *element, + struct dom_string *namespace, struct dom_string *localname, + struct dom_string **value); +dom_exception dom_element_set_attribute_ns(struct dom_element *element, + struct dom_string *namespace, struct dom_string *qname, + struct dom_string *value); +dom_exception dom_element_remove_attribute_ns(struct dom_element *element, + struct dom_string *namespace, struct dom_string *localname); + +dom_exception dom_element_get_attribute_node_ns(struct dom_element *element, + struct dom_string *namespace, struct dom_string *localname, + struct dom_attr **result); +dom_exception dom_element_set_attribute_node_ns(struct dom_element *element, + struct dom_attr *attr, struct dom_attr **result); + +dom_exception dom_element_get_elements_by_tag_name_ns( + struct dom_element *element, struct dom_string *namespace, + struct dom_string *localname, struct dom_nodelist **result); + +dom_exception dom_element_has_attribute(struct dom_element *element, + struct dom_string *name, bool *result); +dom_exception dom_element_has_attribute_ns(struct dom_element *element, + struct dom_string *namespace, struct dom_string *localname, + bool *result); + +dom_exception dom_element_get_schema_type_info(struct dom_element *element, + struct dom_type_info **result); + +dom_exception dom_element_set_id_attribute(struct dom_element *element, + struct dom_string *name, bool is_id); +dom_exception dom_element_set_id_attribute_ns(struct dom_element *element, + struct dom_string *namespace, struct dom_string *localname, + bool is_id); +dom_exception dom_element_set_id_attribute_node(struct dom_element *element, + struct dom_attr *id_attr, bool is_id); + +#endif -- cgit v1.2.3