http://swpat.ffii.org/Action against software patents http://www.gnome.org/Gnome2 Logo http://www.w3.org/StatusW3C Logo http://www.redhat.com/Red Hat Logo http://xmlsoft.org/Made with Libxml2 Logo 
Module uri from libxml2
API Menu ../index.htmlMain Menu ../docs.htmlDeveloper Menu ../examples/index.htmlCode Examples index.htmlAPI Menu libxml-parser.htmlParser API libxml-tree.htmlTree API libxml-xmlreader.htmlReader API ../guidelines.htmlXML Guidelines ../ChangeLog.htmlChangeLog API Indexes ../APIchunk0.htmlAlphabetic ../APIconstructors.htmlConstructors ../APIfunctions.htmlFunctions/Types ../APIfiles.htmlModules ../APIsymbols.htmlSymbols Related links http://mail.gnome.org/archives/xml/Mail archive http://xmlsoft.org/XSLT/XSLT libxslt http://phd.cs.unibo.it/gdome2/DOM gdome2 http://www.aleksey.com/xmlsec/XML-DSig xmlsec ftp://xmlsoft.org/FTP http://www.zlatkovic.com/projects/libxml/Windows binaries http://www.blastwave.org/packages.php/libxml2Solaris binaries http://www.explain.com.au/oss/libxml2xslt.htmlMacOsX binaries http://libxmlplusplus.sourceforge.net/C++ bindings http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4PHP bindings http://sourceforge.net/projects/libxml2-pas/Pascal bindings http://rubyforge.org/projects/xml-tools/Ruby bindings http://tclxml.sourceforge.net/Tcl bindings http://bugzilla.gnome.org/buglist.cgi?product=libxml2Bug Tracker libxml-tree.htmlPrev libxml-tree.htmltree index.htmlUp index.htmlAPI documentation ../index.htmlHome ../index.htmlThe XML C parser and toolkit of Gnome libxml-valid.htmlvalid libxml-valid.htmlNext library of generic URI related routines Implements RFC 2396 
Table of Contents
Structure #xmlURIxmlURI struct _xmlURI
Typedef libxml-uri.html#xmlURIxmlURI  * xmlURIPtr libxml-xmlstring.html#xmlCharxmlChar  *	#xmlBuildRelativeURIxmlBuildRelativeURI 	(const libxml-xmlstring.html#xmlCharxmlChar  * URI, 					 const libxml-xmlstring.html#xmlCharxmlChar  * base) libxml-xmlstring.html#xmlCharxmlChar  *	#xmlBuildURIxmlBuildURI 		(const libxml-xmlstring.html#xmlCharxmlChar  * URI, 					 const libxml-xmlstring.html#xmlCharxmlChar  * base) libxml-xmlstring.html#xmlCharxmlChar  *	#xmlCanonicPathxmlCanonicPath 		(const libxml-xmlstring.html#xmlCharxmlChar  * path) libxml-uri.html#xmlURIPtrxmlURIPtr 	#xmlCreateURIxmlCreateURI 		(void)void	#xmlFreeURIxmlFreeURI 			( libxml-uri.html#xmlURIPtrxmlURIPtr  uri)int	#xmlNormalizeURIPathxmlNormalizeURIPath 		(char * path) libxml-uri.html#xmlURIPtrxmlURIPtr 	#xmlParseURIxmlParseURI 		(const char * str) libxml-uri.html#xmlURIPtrxmlURIPtr 	#xmlParseURIRawxmlParseURIRaw 		(const char * str, 					 int raw)int	#xmlParseURIReferencexmlParseURIReference 		( libxml-uri.html#xmlURIPtrxmlURIPtr  uri, 					 const char * str)void	#xmlPrintURIxmlPrintURI 			(FILE * stream, 					 libxml-uri.html#xmlURIPtrxmlURIPtr  uri) libxml-xmlstring.html#xmlCharxmlChar  *	#xmlSaveUrixmlSaveUri 		( libxml-uri.html#xmlURIPtrxmlURIPtr  uri) libxml-xmlstring.html#xmlCharxmlChar  *	#xmlURIEscapexmlURIEscape 		(const libxml-xmlstring.html#xmlCharxmlChar  * str) libxml-xmlstring.html#xmlCharxmlChar  *	#xmlURIEscapeStrxmlURIEscapeStr 		(const libxml-xmlstring.html#xmlCharxmlChar  * str, 					 const libxml-xmlstring.html#xmlCharxmlChar  * list)char *	#xmlURIUnescapeStringxmlURIUnescapeString 		(const char * str, 					 int len, 					 char * target)Description
Structure xmlURI 
Structure xmlURIstruct _xmlURI {
    char *	scheme	: the URI scheme
    char *	opaque	: opaque part
    char *	authority	: the authority part
    char *	server	: the server part
    char *	user	: the user part
    int	port	: the port number
    char *	path	: the path string
    char *	query	: the query string
    char *	fragment	: the fragment identifier
    int	cleanup	: parsing potentially unclean URI
}
Function: xmlBuildRelativeURI
libxml-xmlstring.html#xmlCharxmlChar  *	xmlBuildRelativeURI	(const libxml-xmlstring.html#xmlCharxmlChar  * URI, 					 const libxml-xmlstring.html#xmlCharxmlChar  * base)Expresses the URI of the libxml-SAX.html#referencereference  in terms relative to the base. Some examples of this operation include: base = "http://site1.com/docs/book1.html" URI input URI returned docs/pic1.gif pic1.gif docs/img/pic1.gif img/pic1.gif img/pic1.gif ../img/pic1.gif http://site1.com/docs/pic1.gif pic1.gif http://site2.com/docs/pic1.gif http://site2.com/docs/pic1.gif base = "docs/book1.html" URI input URI returned docs/pic1.gif pic1.gif docs/img/pic1.gif img/pic1.gif img/pic1.gif ../img/pic1.gif http://site1.com/docs/pic1.gif http://site1.com/docs/pic1.gif Note: if the URI libxml-SAX.html#referencereference  is really wierd or complicated, it may be worthwhile to first convert it into a "nice" one by calling libxml-uri.html#xmlBuildURIxmlBuildURI  (using 'base') before calling this routine, since this routine (for reasonable efficiency) assumes URI has already been through some validation.
URI: the URI libxml-SAX.html#referencereference  under consideration base: the base value Returns: a new URI string (to be freed by the caller) or NULL in case error. Function: xmlBuildURI
libxml-xmlstring.html#xmlCharxmlChar  *	xmlBuildURI		(const libxml-xmlstring.html#xmlCharxmlChar  * URI, 					 const libxml-xmlstring.html#xmlCharxmlChar  * base)Computes he final URI of the libxml-SAX.html#referencereference  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
URI: the URI instance found in the document base: the base value Returns: a new URI string (to be freed by the caller) or NULL in case of error. Function: xmlCanonicPath
libxml-xmlstring.html#xmlCharxmlChar  *	xmlCanonicPath		(const libxml-xmlstring.html#xmlCharxmlChar  * path)Constructs a canonic path from the specified path.
path: the resource locator in a filesystem notation Returns: a new canonic path, or a duplicate of the path parameter if the construction fails. The caller is responsible for freeing the memory occupied by the returned string. If there is insufficient memory available, or the argument is NULL, the function returns NULL. Function: xmlCreateURI
libxml-uri.html#xmlURIPtrxmlURIPtr 	xmlCreateURI		(void)Simply creates an empty libxml-uri.html#xmlURIxmlURI 
Returns: the new structure or NULL in case of error Function: xmlFreeURI
void	xmlFreeURI			( libxml-uri.html#xmlURIPtrxmlURIPtr  uri)Free up the libxml-uri.html#xmlURIxmlURI  struct
uri: pointer to an libxml-uri.html#xmlURIxmlURI Function: xmlNormalizeURIPath
int	xmlNormalizeURIPath		(char * path)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
path: pointer to the path string Returns: 0 or an error code Function: xmlParseURI
libxml-uri.html#xmlURIPtrxmlURIPtr 	xmlParseURI		(const char * str)Parse an URI URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]
str: the URI string to analyze Returns: a newly built libxml-uri.html#xmlURIPtrxmlURIPtr  or NULL in case of error Function: xmlParseURIRaw
libxml-uri.html#xmlURIPtrxmlURIPtr 	xmlParseURIRaw		(const char * str, 					 int raw)Parse an URI but allows to keep intact the original fragments. URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]
str: the URI string to analyze raw: if 1 unescaping of URI pieces are disabled Returns: a newly built libxml-uri.html#xmlURIPtrxmlURIPtr  or NULL in case of error Function: xmlParseURIReference
int	xmlParseURIReference		( libxml-uri.html#xmlURIPtrxmlURIPtr  uri, 					 const char * str)Parse an URI libxml-SAX.html#referencereference  string and fills in the appropriate fields of the @uri structure URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]
uri: pointer to an URI structure str: the string to analyze Returns: 0 or the error code Function: xmlPrintURI
void	xmlPrintURI			(FILE * stream, 					 libxml-uri.html#xmlURIPtrxmlURIPtr  uri)Prints the URI in the stream @stream.
stream: a FILE* for the output uri: pointer to an libxml-uri.html#xmlURIxmlURI Function: xmlSaveUri
libxml-xmlstring.html#xmlCharxmlChar  *	xmlSaveUri		( libxml-uri.html#xmlURIPtrxmlURIPtr  uri)Save the URI as an escaped string
uri: pointer to an libxml-uri.html#xmlURIxmlURI Returns: a new string (to be deallocated by caller) Function: xmlURIEscape
libxml-xmlstring.html#xmlCharxmlChar  *	xmlURIEscape		(const libxml-xmlstring.html#xmlCharxmlChar  * str)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.
str: the string of the URI to escape Returns: an copy of the string, but escaped 25 May 2001 Uses libxml-uri.html#xmlParseURIxmlParseURI  and libxml-uri.html#xmlURIEscapeStrxmlURIEscapeStr  to try to escape correctly according to RFC2396. - Carl Douglas Function: xmlURIEscapeStr
libxml-xmlstring.html#xmlCharxmlChar  *	xmlURIEscapeStr		(const libxml-xmlstring.html#xmlCharxmlChar  * str, 					 const libxml-xmlstring.html#xmlCharxmlChar  * list)This routine escapes a string to hex, ignoring reserved libxml-SAX.html#characterscharacters  (a-z) and the libxml-SAX.html#characterscharacters  in the exception list.
str: string to escape list: exception list string of chars not to escape Returns: a new escaped string or NULL in case of error. Function: xmlURIUnescapeString
char *	xmlURIUnescapeString		(const char * str, 					 int len, 					 char * target)Unescaping routine, does not do validity checks ! Output is direct unsigned char translation of %XX values (no encoding)
str: the string to unescape len: the length in bytes to unescape (or <= 0 to indicate full string) target: optional destination buffer Returns: an copy of the string, but unescaped ../bugs.htmlDaniel Veillard 
