Axis2/C: axiom_xml_reader.h Source File

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

- Search for |

# axiom_xml_reader.h

Go to the documentation of this file.

    00001
    00002 /*
    00003  *   Copyright 2004,2005 The Apache Software Foundation.
    00004  *
    00005  *   Licensed under the Apache License, Version 2.0 (the "License");
    00006  *   you may not use this file except in compliance with the License.
    00007  *   You may obtain a copy of the License at
    00008  *
    00009  *       http://www.apache.org/licenses/LICENSE-2.0
    00010  *
    00011  *   Unless required by applicable law or agreed to in writing, software
    00012  *   distributed under the License is distributed on an "AS IS" BASIS,
    00013  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00014  *   See the License for the specific language governing permissions and
    00015  *   limitations under the License.
    00016  *
    00017  */
    00018
    00019 #ifndef AXIOM_XML_READER_H
    00020 #define AXIOM_XML_READER_H
    00021
    00027 #include <axutil_env.h>
    00028 #include <axutil_utils.h>
    00029 #include <axiom_defines.h>
    00030
    00031 #ifdef __cplusplus
    00032 extern "C"
    00033 {
    00034 #endif
    00035
    00036     typedef struct axiom_xml_reader_ops axiom_xml_reader_ops_t;
    00037     typedef struct axiom_xml_reader axiom_xml_reader_t;
    00038
    00052     typedef enum axiom_xml_reader_event_types
    00053     {
    00054         AXIOM_XML_READER_START_DOCUMENT = 0,
    00055         AXIOM_XML_READER_START_ELEMENT,
    00056         AXIOM_XML_READER_END_ELEMENT,
    00057         AXIOM_XML_READER_SPACE,
    00058         AXIOM_XML_READER_EMPTY_ELEMENT,
    00059         AXIOM_XML_READER_CHARACTER,
    00060         AXIOM_XML_READER_ENTITY_REFERENCE,
    00061         AXIOM_XML_READER_COMMENT,
    00062         AXIOM_XML_READER_PROCESSING_INSTRUCTION,
    00063         AXIOM_XML_READER_CDATA,
    00064         AXIOM_XML_READER_DOCUMENT_TYPE
    00065     } axiom_xml_reader_event_types;
    00066
    00072     struct axiom_xml_reader_ops
    00073     {
    00074
    00084         int(
    00085             AXIS2_CALL
    00086             * next)(
    00087                 axiom_xml_reader_t * parser,
    00088                 const axutil_env_t * env);
    00089
    00097         void(
    00098             AXIS2_CALL
    00099             * free)(
    00100                 axiom_xml_reader_t * parser,
    00101                 const axutil_env_t * env);
    00102
    00110         int(
    00111             AXIS2_CALL
    00112             * get_attribute_count)(
    00113                 axiom_xml_reader_t * parser,
    00114                 const axutil_env_t * env);
    00115
    00125         axis2_char_t *(
    00126             AXIS2_CALL
    00127             * get_attribute_name_by_number)(
    00128                 axiom_xml_reader_t * parser,
    00129                 const axutil_env_t * env,
    00130                 int i);
    00131
    00142         axis2_char_t *(
    00143             AXIS2_CALL
    00144             * get_attribute_prefix_by_number)(
    00145                 axiom_xml_reader_t * parser,
    00146                 const axutil_env_t * env,
    00147                 int i);
    00148
    00159         axis2_char_t *(
    00160             AXIS2_CALL
    00161             * get_attribute_value_by_number)(
    00162                 axiom_xml_reader_t * parser,
    00163                 const axutil_env_t * env,
    00164                 int i);
    00165
    00176         axis2_char_t *(
    00177             AXIS2_CALL
    00178             * get_attribute_namespace_by_number)(
    00179                 axiom_xml_reader_t * parser,
    00180                 const axutil_env_t * env,
    00181                 int i);
    00182
    00189         axis2_char_t *(
    00190             AXIS2_CALL
    00191             * get_value)(
    00192                 axiom_xml_reader_t * parser,
    00193                 const axutil_env_t * env);
    00194
    00201         int(
    00202             AXIS2_CALL
    00203             * get_namespace_count)(
    00204                 axiom_xml_reader_t * parser,
    00205                 const axutil_env_t * env);
    00206
    00216         axis2_char_t *(
    00217             AXIS2_CALL
    00218             * get_namespace_uri_by_number)(
    00219                 axiom_xml_reader_t * parser,
    00220                 const axutil_env_t * env,
    00221                 int i);
    00222
    00232         axis2_char_t *(
    00233             AXIS2_CALL
    00234             * get_namespace_prefix_by_number)(
    00235                 axiom_xml_reader_t * parser,
    00236                 const axutil_env_t * env,
    00237                 int i);
    00238
    00246         axis2_char_t *(
    00247             AXIS2_CALL
    00248             * get_prefix)(
    00249                 axiom_xml_reader_t * parser,
    00250                 const axutil_env_t * env);
    00251
    00259         axis2_char_t *(
    00260             AXIS2_CALL
    00261             * get_name)(
    00262                 axiom_xml_reader_t * parser,
    00263                 const axutil_env_t * env);
    00264
    00272         axis2_char_t *(
    00273             AXIS2_CALL
    00274             * get_pi_target)(
    00275                 axiom_xml_reader_t * parser,
    00276                 const axutil_env_t * env);
    00277
    00285         axis2_char_t *(
    00286             AXIS2_CALL
    00287             * get_pi_data)(
    00288                 axiom_xml_reader_t * parser,
    00289                 const axutil_env_t * env);
    00290
    00298         axis2_char_t *(
    00299             AXIS2_CALL
    00300             * get_dtd)(
    00301                 axiom_xml_reader_t * parser,
    00302                 const axutil_env_t * env);
    00303
    00314         void(
    00315             AXIS2_CALL
    00316             * xml_free)(
    00317                 axiom_xml_reader_t * parser,
    00318                 const axutil_env_t * env,
    00319                 void *data);
    00320
    00328         axis2_char_t *(
    00329             AXIS2_CALL
    00330             * get_char_set_encoding)(
    00331                 axiom_xml_reader_t * parser,
    00332                 const axutil_env_t * env);
    00333
    00335         axis2_char_t *(
    00336             AXIS2_CALL
    00337             * get_namespace_uri)(
    00338                 axiom_xml_reader_t * parser,
    00339                 const axutil_env_t * env);
    00340
    00341         axis2_char_t *(
    00342             AXIS2_CALL
    00343             * get_namespace_uri_by_prefix)(
    00344                 axiom_xml_reader_t * parser,
    00345                 const axutil_env_t * env,
    00346                 axis2_char_t * prefix);
    00347     };
    00348
    00353     struct axiom_xml_reader
    00354     {
    00355         const axiom_xml_reader_ops_t *ops;
    00356     };
    00357
    00366     AXIS2_EXTERN axiom_xml_reader_t *AXIS2_CALL
    00367     axiom_xml_reader_create_for_file(
    00368         const axutil_env_t * env,
    00369         char *filename,
    00370         const axis2_char_t * encoding);
    00371
    00389     AXIS2_EXTERN axiom_xml_reader_t *AXIS2_CALL
    00390     axiom_xml_reader_create_for_io(
    00391         const axutil_env_t * env,
    00392         AXIS2_READ_INPUT_CALLBACK,
    00393         AXIS2_CLOSE_INPUT_CALLBACK,
    00394         void *ctx,
    00395         const axis2_char_t * encoding);
    00396
    00407     AXIS2_EXTERN axiom_xml_reader_t *AXIS2_CALL
    00408     axiom_xml_reader_create_for_memory(
    00409         const axutil_env_t * env,
    00410         void *container,
    00411         int size,
    00412         const axis2_char_t * encoding,
    00413         int type);
    00414
    00419     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00420     axiom_xml_reader_init(void
    00421     );
    00422
    00427     AXIS2_EXTERN axis2_status_t AXIS2_CALL
    00428     axiom_xml_reader_cleanup(void
    00429     );
    00430
    00439     AXIS2_EXTERN int AXIS2_CALL
    00440     axiom_xml_reader_next(
    00441         axiom_xml_reader_t * parser,
    00442         const axutil_env_t * env);
    00443
    00450     AXIS2_EXTERN void AXIS2_CALL
    00451     axiom_xml_reader_free(
    00452         axiom_xml_reader_t * parser,
    00453         const axutil_env_t * env);
    00454
    00462     AXIS2_EXTERN int AXIS2_CALL
    00463     axiom_xml_reader_get_attribute_count(
    00464         axiom_xml_reader_t * parser,
    00465         const axutil_env_t * env);
    00466
    00473     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00474     axiom_xml_reader_get_attribute_name_by_number(
    00475         axiom_xml_reader_t * parser,
    00476         const axutil_env_t * env,
    00477         int i);
    00478
    00485     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00486     axiom_xml_reader_get_attribute_prefix_by_number(
    00487         axiom_xml_reader_t * parser,
    00488         const axutil_env_t * env,
    00489         int i);
    00490
    00497     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00498     axiom_xml_reader_get_attribute_value_by_number(
    00499         axiom_xml_reader_t * parser,
    00500         const axutil_env_t * env,
    00501         int i);
    00502
    00509     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00510     axiom_xml_reader_get_attribute_namespace_by_number(
    00511         axiom_xml_reader_t * parser,
    00512         const axutil_env_t * env,
    00513         int i);
    00514
    00521     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00522     axiom_xml_reader_get_value(
    00523         axiom_xml_reader_t * parser,
    00524         const axutil_env_t * env);
    00525
    00532     AXIS2_EXTERN int AXIS2_CALL
    00533     axiom_xml_reader_get_namespace_count(
    00534         axiom_xml_reader_t * parser,
    00535         const axutil_env_t * env);
    00536
    00543     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00544     axiom_xml_reader_get_namespace_uri_by_number(
    00545         axiom_xml_reader_t * parser,
    00546         const axutil_env_t * env,
    00547         int i);
    00548
    00555     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00556     axiom_xml_reader_get_namespace_prefix_by_number(
    00557         axiom_xml_reader_t * parser,
    00558         const axutil_env_t * env,
    00559         int i);
    00560
    00567     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00568     axiom_xml_reader_get_prefix(
    00569         axiom_xml_reader_t * parser,
    00570         const axutil_env_t * env);
    00571
    00578     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00579     axiom_xml_reader_get_name(
    00580         axiom_xml_reader_t * parser,
    00581         const axutil_env_t * env);
    00582
    00589     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00590     axiom_xml_reader_get_pi_target(
    00591         axiom_xml_reader_t * parser,
    00592         const axutil_env_t * env);
    00593
    00600     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00601     axiom_xml_reader_get_pi_data(
    00602         axiom_xml_reader_t * parser,
    00603         const axutil_env_t * env);
    00604
    00611     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00612     axiom_xml_reader_get_dtd(
    00613         axiom_xml_reader_t * parser,
    00614         const axutil_env_t * env);
    00615
    00622     AXIS2_EXTERN void AXIS2_CALL
    00623     axiom_xml_reader_xml_free(
    00624         axiom_xml_reader_t * parser,
    00625         const axutil_env_t * env,
    00626         void *data);
    00627
    00635     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00636     axiom_xml_reader_get_char_set_encoding(
    00637         axiom_xml_reader_t * parser,
    00638         const axutil_env_t * env);
    00639
    00646     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00647     axiom_xml_reader_get_namespace_uri(
    00648         axiom_xml_reader_t * parser,
    00649         const axutil_env_t * env);
    00650
    00658     AXIS2_EXTERN axis2_char_t *AXIS2_CALL
    00659     axiom_xml_reader_get_namespace_uri_by_prefix(
    00660         axiom_xml_reader_t * parser,
    00661         const axutil_env_t * env,
    00662         axis2_char_t * prefix);
    00663
    00666 #ifdef __cplusplus
    00667 }
    00668 #endif
    00669
    00670 #endif                          /* AXIOM_XML_READER_H */
    00671
    00672
    00673
    00674
    00675
    00676
    00677
    00678
    00679
    00680
    00681
    00682
    00683
    00684