- Main Page
- Modules
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

# axiom_element.h

    00001
    00002 /*
    00003  * Licensed to the Apache Software Foundation (ASF) under one or more
    00004  * contributor license agreements.  See the NOTICE file distributed with
    00005  * this work for additional information regarding copyright ownership.
    00006  * The ASF licenses this file to You under the Apache License, Version 2.0
    00007  * (the "License"); you may not use this file except in compliance with
    00008  * the License.  You may obtain a copy of the License at
    00009  *
    00010  *      http://www.apache.org/licenses/LICENSE-2.0
    00011  *
    00012  * Unless required by applicable law or agreed to in writing, software
    00013  * distributed under the License is distributed on an "AS IS" BASIS,
    00014  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00015  * See the License for the specific language governing permissions and
    00016  * limitations under the License.
    00017  */
    00018
    00019 #ifndef AXIOM_ELEMENT_H
    00020 #define AXIOM_ELEMENT_H
    00021
    00022 #include <axiom_namespace.h>
    00023 #include <axiom_attribute.h>
    00024 #include <axiom_output.h>
    00025 #include <axiom_node.h>
    00026 #include <axiom_children_iterator.h>
    00027 #include <axiom_children_qname_iterator.h>
    00028 #include <axiom_child_element_iterator.h>
    00029 #include <axutil_hash.h>
    00030 #include <axutil_utils.h>
    00031
    00032 #ifdef __cplusplus
    00033 extern "C"
    00034 {
    00035 #endif
    00036
    00037     typedef struct axiom_element axiom_element_t;
    00038
    00062     AXIS2_EXTERN axiom_element_t *AXIS2_CALL
    00063     axiom_element_create(
    00064         const axutil_env_t * env,
    00065         axiom_node_t * parent,
    00066         const axis2_char_t * localname,
    00067         axiom_namespace_t * ns,
    00068         axiom_node_t ** node);
    00069
    00080     AXIS2_EXTERN axiom_element_t *AXIS2_CALL
    00081     axiom_element_create_with_qname(
    00082         const axutil_env_t * env,
    00083         axiom_node_t * parent,
    00084         const axutil_qname_t * qname,
    00085         axiom_node_t ** node);
    00086     /*
    00087      * Find a namespace in the scope of the document.
    00088      * Start to find from the given node and go up the hierarchy.
    00089      * @param om_element pointer to om_element_struct contained in
    00090      *        node ,
    00091      * @param env Environment. MUST NOT be NULL.
    00092      * @param node node containing an instance of an AXIOM element,cannot be NULL.
    00093      * @param uri namespace uri..
    00094      * @param prefix namespace prefix. can be NULL.
    00095      * @return pointer to the namespace, if found, else NULL. On error, returns
    00096      *           NULL and sets error code in environment,s error
    00097      */
    00098     AXIS2_EXTERN axiom_namespace_t *AXIS2_CALL
    00099     axiom_element_find_namespace(
    00100         axiom_element_t * om_element,
    00101         const axutil_env_t * env,
    00102         axiom_node_t * node,
    00103         const axis2_char_t * uri,
    00104         const axis2_char_t * prefix);
    00105
    00115     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00116     axiom_element_declare_namespace(
    00117         axiom_element_t * om_element,
    00118         const axutil_env_t * env,
    00119         axiom_node_t * node,
    00120         axiom_namespace_t * ns);
    00128     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00129     axiom_element_declare_namespace_assume_param_ownership(
    00130         axiom_element_t * om_element,
    00131         const axutil_env_t * env,
    00132         axiom_namespace_t * ns);
    00133
    00144     AXIS2_EXTERN axiom_namespace_t *AXIS2_CALL
    00145     axiom_element_find_namespace_with_qname(
    00146         axiom_element_t * om_element,
    00147         const axutil_env_t * env,
    00148         axiom_node_t * node,
    00149         axutil_qname_t * qname);
    00150
    00159     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00160     axiom_element_add_attribute(
    00161         axiom_element_t * om_element,
    00162         const axutil_env_t * env,
    00163         axiom_attribute_t * attribute,
    00164         axiom_node_t * node);
    00165
    00174     AXIS2_EXTERN axiom_attribute_t *AXIS2_CALL
    00175     axiom_element_get_attribute(
    00176         axiom_element_t * om_element,
    00177         const axutil_env_t * env,
    00178         axutil_qname_t * qname);
    00179
    00188     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00189     axiom_element_get_attribute_value(
    00190         axiom_element_t * om_element,
    00191         const axutil_env_t * env,
    00192         axutil_qname_t * qname);
    00193
    00200     AXIS2_EXTERN void AXIS2_CALL
    00201     axiom_element_free(
    00202         axiom_element_t * element,
    00203         const axutil_env_t * env);
    00204
    00212     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00213     axiom_element_serialize_start_part(
    00214         axiom_element_t * om_element,
    00215         const axutil_env_t * env,
    00216         axiom_output_t * om_output,
    00217         axiom_node_t * ele_node);
    00218
    00228     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00229     axiom_element_serialize_end_part(
    00230         axiom_element_t * om_element,
    00231         const axutil_env_t * env,
    00232         axiom_output_t * om_output);
    00233
    00244     AXIS2_EXTERN axiom_namespace_t *AXIS2_CALL
    00245     axiom_element_find_declared_namespace(
    00246         axiom_element_t * om_element,
    00247         const axutil_env_t * env,
    00248         const axis2_char_t * uri,
    00249         const axis2_char_t * prefix);
    00250
    00257     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00258     axiom_element_get_localname(
    00259         axiom_element_t * om_element,
    00260         const axutil_env_t * env);
    00261
    00270     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00271     axiom_element_set_localname(
    00272         axiom_element_t * om_element,
    00273         const axutil_env_t * env,
    00274         const axis2_char_t * localname);
    00275
    00284     AXIS2_EXTERN axiom_namespace_t *AXIS2_CALL
    00285     axiom_element_get_namespace(
    00286         axiom_element_t * om_element,
    00287         const axutil_env_t * env,
    00288         axiom_node_t * ele_node);
    00289
    00301     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00302     axiom_element_set_namespace(
    00303         axiom_element_t * om_element,
    00304         const axutil_env_t * env,
    00305         axiom_namespace_t * ns,
    00306         axiom_node_t * node);
    00307
    00308
    00318     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00319     axiom_element_set_namespace_assume_param_ownership(
    00320         axiom_element_t * om_element,
    00321         const axutil_env_t * env,
    00322         axiom_namespace_t * ns);
    00323
    00331     AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
    00332     axiom_element_get_all_attributes(
    00333         axiom_element_t * om_element,
    00334         const axutil_env_t * env);
    00335
    00343     AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
    00344     axiom_element_get_namespaces(
    00345         axiom_element_t * om_element,
    00346         const axutil_env_t * env);
    00347
    00359     AXIS2_EXTERN axutil_qname_t *AXIS2_CALL
    00360     axiom_element_get_qname(
    00361         axiom_element_t * om_element,
    00362         const axutil_env_t * env,
    00363         axiom_node_t * ele_node);
    00364
    00375     AXIS2_EXTERN axiom_children_iterator_t *AXIS2_CALL
    00376     axiom_element_get_children(
    00377         axiom_element_t * om_element,
    00378         const axutil_env_t * env,
    00379         axiom_node_t * element_node);
    00380
    00391     AXIS2_EXTERN axiom_children_qname_iterator_t *AXIS2_CALL
    00392     axiom_element_get_children_with_qname(
    00393         axiom_element_t * om_element,
    00394         const axutil_env_t * env,
    00395         axutil_qname_t * element_qname,
    00396         axiom_node_t * element_node);
    00397
    00409     AXIS2_EXTERN axiom_element_t *AXIS2_CALL
    00410     axiom_element_get_first_child_with_qname(
    00411         axiom_element_t * om_element,
    00412         const axutil_env_t * env,
    00413         axutil_qname_t * element_qname,
    00414         axiom_node_t * element_node,
    00415         axiom_node_t ** child_node);
    00416
    00427     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00428     axiom_element_remove_attribute(
    00429         axiom_element_t * om_element,
    00430         const axutil_env_t * env,
    00431         axiom_attribute_t * om_attribute);
    00432
    00444     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00445     axiom_element_set_text(
    00446         axiom_element_t * om_element,
    00447         const axutil_env_t * env,
    00448         const axis2_char_t * text,
    00449         axiom_node_t * element_node);
    00450
    00462     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00463     axiom_element_get_text(
    00464         axiom_element_t * om_element,
    00465         const axutil_env_t * env,
    00466         axiom_node_t * element_node);
    00467
    00475     AXIS2_EXTERN axiom_element_t *AXIS2_CALL
    00476     axiom_element_get_first_element(
    00477         axiom_element_t * om_element,
    00478         const axutil_env_t * env,
    00479         axiom_node_t * element_node,
    00480         axiom_node_t ** first_element_node);
    00481
    00489     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00490     axiom_element_to_string(
    00491         axiom_element_t * om_element,
    00492         const axutil_env_t * env,
    00493         axiom_node_t * element_node);
    00494
    00503     AXIS2_EXTERN axiom_child_element_iterator_t *AXIS2_CALL
    00504     axiom_element_get_child_elements(
    00505         axiom_element_t * om_element,
    00506         const axutil_env_t * env,
    00507         axiom_node_t * element_node);
    00508
    00520     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00521     axiom_element_build(
    00522         axiom_element_t * om_element,
    00523         const axutil_env_t * env,
    00524         axiom_node_t * element_node);
    00525
    00533     AXIS2_EXTERN axiom_namespace_t *AXIS2_CALL
    00534     axiom_element_get_default_namespace(
    00535         axiom_element_t * om_element,
    00536         const axutil_env_t * env,
    00537         axiom_node_t * element_node);
    00538
    00546     AXIS2_EXTERN axiom_namespace_t *AXIS2_CALL
    00547     axiom_element_declare_default_namespace(
    00548         axiom_element_t * om_element,
    00549         const axutil_env_t * env,
    00550         axis2_char_t * uri);
    00551
    00560     AXIS2_EXTERN axiom_namespace_t *AXIS2_CALL
    00561     axiom_element_find_namespace_uri(
    00562         axiom_element_t * om_element,
    00563         const axutil_env_t * env,
    00564         const axis2_char_t * prefix,
    00565         axiom_node_t * element_node);
    00566
    00577     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00578     axiom_element_set_namespace_with_no_find_in_current_scope(
    00579         axiom_element_t * om_element,
    00580         const axutil_env_t * env,
    00581         axiom_namespace_t * om_ns);
    00582
    00591     AXIS2_EXTERN axutil_hash_t *AXIS2_CALL
    00592     axiom_element_extract_attributes(
    00593         axiom_element_t * om_element,
    00594         const axutil_env_t * env,
    00595         axiom_node_t * ele_node);
    00596
    00605     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00606     axiom_element_get_attribute_value_by_name(
    00607         axiom_element_t * om_ele,
    00608         const axutil_env_t * env,
    00609         axis2_char_t * attr_name);
    00610
    00620     AXIS2_EXTERN axiom_element_t *AXIS2_CALL
    00621     axiom_element_create_str(
    00622         const axutil_env_t * env,
    00623         axiom_node_t * parent,
    00624         axutil_string_t * localname,
    00625         axiom_namespace_t * ns,
    00626         axiom_node_t ** node);
    00627
    00636     AXIS2_EXTERN axutil_string_t *AXIS2_CALL
    00637     axiom_element_get_localname_str(
    00638         axiom_element_t * om_element,
    00639         const axutil_env_t * env);
    00640
    00649     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00650     axiom_element_set_localname_str(
    00651         axiom_element_t * om_element,
    00652         const axutil_env_t * env,
    00653         axutil_string_t * localname);
    00654
    00662     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
    00663     axiom_element_get_is_empty(
    00664         axiom_element_t * om_element,
    00665         const axutil_env_t * env);
    00666
    00675     AXIS2_EXTERN void AXIS2_CALL
    00676     axiom_element_set_is_empty(
    00677         axiom_element_t * om_element,
    00678         const axutil_env_t * env,
    00679         axis2_bool_t is_empty);
    00680
    00692     AXIS2_EXTERN axutil_hash_t * AXIS2_CALL
    00693     axiom_element_gather_parent_namespaces(
    00694         axiom_element_t * om_element,
    00695         const axutil_env_t * env,
    00696         axiom_node_t * om_node);
    00697
    00710     AXIS2_EXTERN void AXIS2_CALL
    00711     axiom_element_use_parent_namespace(
    00712         axiom_element_t * om_element,
    00713         const axutil_env_t * env,
    00714         axiom_node_t * om_node,
    00715         axiom_namespace_t *ns,
    00716         axiom_element_t * root_element,
    00717         axutil_hash_t *inscope_namespaces);
    00718
    00733     AXIS2_EXTERN void AXIS2_CALL
    00734     axiom_element_redeclare_parent_namespaces(
    00735         axiom_element_t * om_element,
    00736         const axutil_env_t * env,
    00737         axiom_node_t * om_node,
    00738         axiom_element_t * root_element,
    00739         axutil_hash_t *inscope_namespaces);
    00740
    00743 #ifdef __cplusplus
    00744 }
    00745 #endif
    00746
    00747 #endif                          /* AXIOM_ELEMENT_H */