typedef struct _xmlURI | xmlURI |
xmlURI:
A parsed URI reference. This is a struct containing the various fields as described in RFC 2396 but separated for further processing.
typedef xmlURI * | xmlURIPtr |
XMLPUBFUN xmlURIPtr XMLCALL | xmlCreateURI | ( | void | ) |
xmlCreateURI:
Simply creates an empty xmlURI
Returns the new structure or NULL in case of error
OOM: possible --> returns NULL , sets OOM flag
xmlBuildURI: Computes he final URI of the reference done by checking that the given URI is valid, and building the final URI using the base URI. This is processed according to section 5.2 of the RFC 2396
5.2. Resolving Relative References to Absolute Form
Returns a new URI string (to be freed by the caller) or NULL in case of error.
OOM:
Parameters | |
---|---|
URI | the URI instance found in the document |
base | the base value |
XMLPUBFUN xmlURIPtr XMLCALL | xmlParseURI | ( | const char * | str | ) |
xmlParseURI: Parse an URI
URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]
Returns a newly build xmlURIPtr or NULL in case of error
OOM: possible --> returns NULL for uri!=NULL
Parameters | |
---|---|
str | the URI string to analyze |
XMLPUBFUN int XMLCALL | xmlParseURIReference | ( | xmlURIPtr | uri, |
const char * | str | |||
) |
xmlParseURIReference: Parse an URI reference string and fills in the appropriate fields of the uri structure
URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]
Returns 0 or the error code
OOM: possible --> sets OOM flag and returns XML_ERR_NO_MEMORY
Parameters | |
---|---|
uri | pointer to an URI structure |
str | the string to analyze |
xmlURIEscapeStr: This routine escapes a string to hex, ignoring reserved characters (a-z) and the characters in the exception list.
Returns a new escaped string or NULL in case of error.
Parameters | |
---|---|
str | string to escape |
list | exception list string of chars not to escape |
XMLPUBFUN char *XMLCALL | xmlURIUnescapeString | ( | const char * | str, |
int | len, | |||
char * | target | |||
) |
xmlURIUnescapeString: Unescaping routine, does not do validity checks ! Output is direct unsigned char translation of XX values (no encoding)
Returns an copy of the string, but unescaped
OOM: possible --> sets OOM when returns NULL for target==NULL
Parameters | |
---|---|
str | the string to unescape |
len | the length in bytes to unescape (or <= 0 to indicate full string) |
target | optional destination buffer |
XMLPUBFUN int XMLCALL | xmlNormalizeURIPath | ( | char * | path | ) |
xmlNormalizeURIPath: Applies the 5 normalization steps to a path string--that is, RFC 2396 Section 5.2, steps 6.c through 6.g.
Normalization occurs directly on the string, no new allocation is done
Returns 0 or an error code
Parameters | |
---|---|
path | pointer to the path string |
xmlURIEscape: Escaping routine, does not do validity checks ! It will try to escape the chars needing this, but this is heuristic based it's impossible to be sure.
Returns an copy of the string, but escaped
Carl Douglas
Parameters | |
---|---|
str | the string of the URI to escape |
XMLPUBFUN void XMLCALL | xmlFreeURI | ( | xmlURIPtr | uri | ) |
xmlFreeURI: Free up the xmlURI struct
Parameters | |
---|---|
uri | pointer to an xmlURI |