Apache Portable Runtime
apr_xml_internal.h
00001 /* Licensed to the Apache Software Foundation (ASF) under one or more
00002  * contributor license agreements.  See the NOTICE file distributed with
00003  * this work for additional information regarding copyright ownership.
00004  * The ASF licenses this file to You under the Apache License, Version 2.0
00005  * (the "License"); you may not use this file except in compliance with
00006  * the License.  You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef APR_XML_INTERNAL_H
00018 #define APR_XML_INTERNAL_H
00019 
00020 
00021 struct XMLParserImpl {
00022     apr_status_t (*Parse)(apr_xml_parser*, const char*, apr_size_t, int);
00023     apr_status_t (*cleanup)(void*);
00024 };
00025 typedef struct XMLParserImpl XMLParserImpl;
00026 XMLParserImpl* apr_xml_get_parser_impl(void);
00027 
00028 
00029 /* the real (internal) definition of the parser context */
00030 struct apr_xml_parser {
00031     apr_xml_doc *doc;           /* the doc we're parsing */
00032     apr_pool_t *p;              /* the pool we allocate from */
00033     apr_xml_elem *cur_elem;     /* current element */
00034 
00035     int error;                  /* an error has occurred */
00036 #define APR_XML_ERROR_EXPAT             1
00037 #define APR_XML_ERROR_PARSE_DONE        2
00038 /* also: public APR_XML_NS_ERROR_* values (if any) */
00039 
00040     XML_Parser xp;              /* the actual (Expat) XML parser */
00041     XML_Error xp_err;      /* stored Expat error code */
00042     const char *xp_msg;
00043     XMLParserImpl *impl;
00044 };
00045 
00046 apr_xml_parser* apr_xml_parser_create_internal(apr_pool_t*, void*, void*, void*);
00047 
00048 #endif
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines