Gnome XML Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# uri

## Name

uri --

## Synopsis

    struct      xmlURI;
    typedef     xmlURIPtr;
    xmlURIPtr   xmlCreateURI                    (void);
    xmlChar*    xmlBuildURI                     (const xmlChar *URI,
                                                 const xmlChar *base);
    xmlURIPtr   xmlParseURI                     (const char *str);
    int         xmlParseURIReference            (xmlURIPtr uri,
                                                 const char *str);
    xmlChar*    xmlSaveUri                      (xmlURIPtr uri);
    void        xmlPrintURI                     (FILE *stream,
                                                 xmlURIPtr uri);
    xmlChar*    xmlURIEscapeStr                 (const xmlChar *str,
                                                 const xmlChar *list);
    char*       xmlURIUnescapeString            (const char *str,
                                                 int len,
                                                 char *target);
    int         xmlNormalizeURIPath             (char *path);
    xmlChar*    xmlURIEscape                    (const xmlChar *str);
    void        xmlFreeURI                      (xmlURIPtr uri);
    xmlChar*    xmlCanonicPath                  (const xmlChar *path);

## Description

## Details

### struct xmlURI

    struct 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 */
    };

A parsed URI reference. This is a struct containing the various fields as described in RFC 2396 but separated for further processing.

### xmlURIPtr

### xmlCreateURI ()

    xmlURIPtr   xmlCreateURI                    (void);

Simply creates an empty xmlURI

Returns : |

### xmlBuildURI ()

    xmlChar*    xmlBuildURI                     (const xmlChar *URI,
                                                 const xmlChar *base);

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

`URI` : |
`base` : |
Returns : |

### xmlParseURI ()

    xmlURIPtr   xmlParseURI                     (const char *str);

Parse an URI

URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]

`str` : |
Returns : |

### xmlParseURIReference ()

    int         xmlParseURIReference            (xmlURIPtr uri,
                                                 const char *str);

Parse an URI reference string and fills in the appropriate fields of the `uri` structure

URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]

`uri` : |
`str` : |
Returns : |

### xmlSaveUri ()

    xmlChar*    xmlSaveUri                      (xmlURIPtr uri);

Save the URI as an escaped string

`uri` : |
Returns : |

### xmlPrintURI ()

    void        xmlPrintURI                     (FILE *stream,
                                                 xmlURIPtr uri);

Prints the URI in the stream `steam`.

`stream` : |
`uri` : |

### xmlURIEscapeStr ()

    xmlChar*    xmlURIEscapeStr                 (const xmlChar *str,
                                                 const xmlChar *list);

This routine escapes a string to hex, ignoring reserved characters (a-z) and the characters in the exception list.

`str` : |
`list` : |
Returns : |

### 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` : |
`len` : |
`target` : |
Returns : |

### 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` : |
Returns : |

### xmlURIEscape ()

    xmlChar*    xmlURIEscape                    (const xmlChar *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` : |
Returns : |

### xmlFreeURI ()

    void        xmlFreeURI                      (xmlURIPtr uri);

Free up the xmlURI struct

`uri` : |

### xmlCanonicPath ()

    xmlChar*    xmlCanonicPath                  (const xmlChar *path);

Constructs a canonic path from the specified path.

`path` : |
Returns : |

<<< Previous Page | Home | Up | Next Page >>>
relaxng | xmlerror