Apache HTTPD
Namespaces | Classes | Macros | Typedefs | Functions | Variables
XML

Namespaces

namespace  Apache
 

Classes

struct  apr_text
 
struct  apr_text_header
 
struct  apr_xml_attr
 
struct  apr_xml_elem
 
struct  apr_xml_doc
 

Macros

#define APR_XML_NS_DAV_ID   0
 
#define APR_XML_NS_NONE   -10
 
#define APR_XML_NS_ERROR_BASE   -100
 
#define APR_XML_NS_IS_ERROR(e)   ((e) <= APR_XML_NS_ERROR_BASE)
 
#define APR_XML_ELEM_IS_EMPTY(e)
 
#define APR_XML_X2T_FULL   0
 
#define APR_XML_X2T_INNER   1
 
#define APR_XML_X2T_LANG_INNER   2
 
#define APR_XML_X2T_FULL_NS_LANG   3
 
#define APR_XML_X2T_PARSED   4
 
#define APR_XML_GET_URI_ITEM(ary, i)   (((const char * const *)(ary)->elts)[i])
 

Typedefs

typedef struct apr_text apr_text
 
typedef struct apr_text_header apr_text_header
 
typedef struct apr_xml_attr apr_xml_attr
 
typedef struct apr_xml_elem apr_xml_elem
 
typedef struct apr_xml_doc apr_xml_doc
 
typedef struct apr_xml_parser apr_xml_parser
 

Functions

 APU_DECLARE (void) apr_text_append(apr_pool_t *p
 Computes SipHash-2-4, producing a 64bit (APR_SIPHASH_DSIZE) hash from a message and a 128bit (APR_SIPHASH_KSIZE) secret key, into a possibly unaligned buffer (using the little endian representation as defined by the authors for interoperabilty) usable as a MAC.
 
 APU_DECLARE (apr_xml_parser *) apr_xml_parser_create(apr_pool_t *pool)
 
 APU_DECLARE (apr_status_t) apr_xml_parse_file(apr_pool_t *p
 
 APU_DECLARE (char *) apr_xml_parser_geterror(apr_xml_parser *parser
 
 APU_DECLARE (const char *) apr_xml_empty_elem(apr_pool_t *p
 

Variables

apr_text_headerhdr
 
apr_text_header const chartext
 
apr_xml_parser ** parser
 
apr_xml_parser apr_xml_doc ** ppdoc
 
apr_xml_parser apr_xml_doc apr_file_txmlfd
 
apr_xml_parser apr_xml_doc apr_file_t apr_size_t buffer_length
 
const chardata
 
const char apr_size_t len
 
apr_xml_doc ** pdoc
 
charerrbuf
 
char apr_size_t errbufsize
 
const apr_xml_elemelem
 
const apr_xml_elem int style
 
const apr_xml_elem int apr_array_header_tnamespaces
 
const apr_xml_elem int apr_array_header_t intns_map
 
const apr_xml_elem int apr_array_header_t int const char ** pbuf
 
const apr_xml_elem int apr_array_header_t int const char apr_size_tpsize
 
const chars
 
const char int quotes
 
const charuri
 

Detailed Description

Macro Definition Documentation

◆ APR_XML_ELEM_IS_EMPTY

#define APR_XML_ELEM_IS_EMPTY (   e)
Value:
((e)->first_child == NULL && \
(e)->first_cdata.first == NULL)
apr_bucket * e
return NULL
Definition mod_so.c:359

Is this XML element empty?

Definition at line 196 of file apr_xml.h.

◆ APR_XML_GET_URI_ITEM

#define APR_XML_GET_URI_ITEM (   ary,
  i 
)    (((const char * const *)(ary)->elts)[i])

Get the URI item for this XML element

Definition at line 339 of file apr_xml.h.

◆ APR_XML_NS_DAV_ID

#define APR_XML_NS_DAV_ID   0

namespace ID for "DAV:"

Definition at line 133 of file apr_xml.h.

◆ APR_XML_NS_ERROR_BASE

#define APR_XML_NS_ERROR_BASE   -100

used only during processing

Definition at line 136 of file apr_xml.h.

◆ APR_XML_NS_IS_ERROR

#define APR_XML_NS_IS_ERROR (   e)    ((e) <= APR_XML_NS_ERROR_BASE)

Is this namespace an error?

Definition at line 138 of file apr_xml.h.

◆ APR_XML_NS_NONE

#define APR_XML_NS_NONE   -10

no namespace for this elem/attr

Definition at line 134 of file apr_xml.h.

◆ APR_XML_X2T_FULL

#define APR_XML_X2T_FULL   0

start tag, contents, end tag

Definition at line 292 of file apr_xml.h.

◆ APR_XML_X2T_FULL_NS_LANG

#define APR_XML_X2T_FULL_NS_LANG   3

FULL + ns defns + xml:lang

Definition at line 295 of file apr_xml.h.

◆ APR_XML_X2T_INNER

#define APR_XML_X2T_INNER   1

contents only

Definition at line 293 of file apr_xml.h.

◆ APR_XML_X2T_LANG_INNER

#define APR_XML_X2T_LANG_INNER   2

xml:lang + inner contents

Definition at line 294 of file apr_xml.h.

◆ APR_XML_X2T_PARSED

#define APR_XML_X2T_PARSED   4

original prefixes

Definition at line 296 of file apr_xml.h.

Typedef Documentation

◆ apr_text

See also
apr_text

Definition at line 50 of file apr_xml.h.

◆ apr_text_header

See also
apr_text_header

Definition at line 61 of file apr_xml.h.

◆ apr_xml_attr

See also
apr_xml_attr

Definition at line 141 of file apr_xml.h.

◆ apr_xml_doc

See also
apr_xml_doc

Definition at line 145 of file apr_xml.h.

◆ apr_xml_elem

See also
apr_xml_elem

Definition at line 143 of file apr_xml.h.

◆ apr_xml_parser

Opaque XML parser structure

Definition at line 208 of file apr_xml.h.

Function Documentation

◆ APU_DECLARE() [1/5]

APU_DECLARE ( apr_status_t  )

Parse a File, producing a xml_doc

Parameters
pThe pool for allocating the parse results.
parserA pointer to *parser (needed so calling function can get errors), will be set to NULL on successful completion.
ppdocA pointer to *apr_xml_doc (which has the parsed results in it)
xmlfdA file to read from.
buffer_lengthBuffer length which would be suitable
Returns
Any errors found during parsing.

Feed input into the parser

Parameters
parserThe XML parser for parsing this data.
dataThe data to parse.
lenThe length of the data.
Returns
Any errors found during parsing.
Remarks
Use apr_xml_parser_geterror() to get more error information.

Terminate the parsing and return the result

Parameters
parserThe XML parser for parsing this data.
pdocThe resulting parse information. May be NULL to simply terminate the parsing without fetching the info.
Returns
Any errors found during the final stage of parsing.
Remarks
Use apr_xml_parser_geterror() to get more error information.

return the URI's (existing) index, or insert it and return a new index

Parameters
uri_arrayarray to insert into
uriThe uri to insert
Returns
int The uri's index

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".

< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".

< Replace

< Insert with duplicates

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< mask to extract lock type

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".

< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".

< Size of the file

< Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a "read lock", preventing writers from establishing an exclusive lock.

< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".

Definition at line 358 of file apr_brigade.c.

◆ APU_DECLARE() [2/5]

APU_DECLARE ( apr_xml_parser )

Create an XML parser

Parameters
poolThe pool for allocating the parser and the parse results.
Returns
The new parser.

Definition at line 389 of file apr_xml.c.

◆ APU_DECLARE() [3/5]

APU_DECLARE ( char )

Fetch additional error information from the parser.

Parameters
parserThe XML parser to query for errors.
errbufA buffer for storing error text.
errbufsizeThe length of the error text buffer.
Returns
The error buffer

◆ APU_DECLARE() [4/5]

APU_DECLARE ( const char )

empty XML element

Parameters
pThe pool to allocate out of
elemThe XML element to empty
Returns
the string that was stored in the XML element

quote an XML string Replace '<', '>', and '&' with '&lt;', '&gt;', and '&amp;'.

Parameters
pThe pool to allocate out of
sThe string to quote
quotesIf quotes is true, then replace '"' with '&quot;'.
Returns
The quoted string
Note
If the string does not contain special characters, it is not duplicated into the pool and the original string is returned.

< no namespace for this elem/attr

Definition at line 131 of file apr_dbd.c.

◆ APU_DECLARE() [5/5]

APU_DECLARE ( void  )

Computes SipHash-2-4, producing a 64bit (APR_SIPHASH_DSIZE) hash from a message and a 128bit (APR_SIPHASH_KSIZE) secret key, into a possibly unaligned buffer (using the little endian representation as defined by the authors for interoperabilty) usable as a MAC.

Append a piece of text to the end of a list

Parameters
pThe pool to allocate out of
hdrThe text header to append to
textThe new text to append

Converts an XML element tree to flat text

Parameters
pThe pool to allocate out of
elemThe XML element to convert
styleHow to covert the XML. One of:
    APR_XML_X2T_FULL                start tag, contents, end tag 
    APR_XML_X2T_INNER               contents only 
    APR_XML_X2T_LANG_INNER          xml:lang + inner contents 
    APR_XML_X2T_FULL_NS_LANG        FULL + ns defns + xml:lang 
    APR_XML_X2T_PARSED              original prefixes
namespacesThe namespace of the current XML element
ns_mapNamespace mapping
pbufBuffer to put the converted text into
psizeSize of the converted text

Quote an XML element

Parameters
pThe pool to allocate out of
elemThe element to quote

< use pool pre cleanup

Definition at line 128 of file apr_sha1.c.

Variable Documentation

◆ buffer_length

Definition at line 231 of file apr_xml.h.

◆ data

const char* data

Definition at line 243 of file apr_xml.h.

◆ elem

Definition at line 286 of file apr_xml.h.

◆ errbuf

char* errbuf

Definition at line 265 of file apr_xml.h.

◆ errbufsize

char apr_size_t errbufsize

Definition at line 266 of file apr_xml.h.

◆ hdr

Definition at line 77 of file apr_xml.h.

◆ len

Definition at line 244 of file apr_xml.h.

◆ namespaces

Definition at line 287 of file apr_xml.h.

◆ ns_map

Definition at line 288 of file apr_xml.h.

◆ parser

apr_xml_parser** parser

Definition at line 228 of file apr_xml.h.

◆ pbuf

Definition at line 288 of file apr_xml.h.

◆ pdoc

apr_xml_doc** pdoc

Definition at line 255 of file apr_xml.h.

◆ ppdoc

Definition at line 229 of file apr_xml.h.

◆ psize

Definition at line 289 of file apr_xml.h.

◆ quotes

const char int quotes

Definition at line 318 of file apr_xml.h.

◆ s

const char* s

Definition at line 317 of file apr_xml.h.

◆ style

Definition at line 287 of file apr_xml.h.

◆ text

static char * text

Definition at line 78 of file apr_xml.h.

◆ uri

const char* uri

Definition at line 336 of file apr_xml.h.

◆ xmlfd

Definition at line 230 of file apr_xml.h.