blob: 8b201400a33c7b611065a25f8943d10009412723 [file] [log] [blame]
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001<HTML
2><HEAD
3><TITLE
4>uri</TITLE
5><META
6NAME="GENERATOR"
Daniel Veillard503b8932001-01-05 06:36:31 +00007CONTENT="Modular DocBook HTML Stylesheet Version 1.44"><LINK
Daniel Veillardb732a0e2000-10-15 11:27:01 +00008REL="HOME"
9TITLE="Gnome XML Library Reference Manual"
10HREF="book1.html"><LINK
11REL="UP"
12TITLE="Libxml Library Reference"
13HREF="libxml-lib.html"><LINK
14REL="PREVIOUS"
15TITLE="valid"
Daniel Veillard9cb5ff42001-01-29 08:22:21 +000016HREF="libxml-valid.html"><LINK
Daniel Veillardb732a0e2000-10-15 11:27:01 +000017REL="NEXT"
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +000018TITLE="xmlerror"
19HREF="libxml-xmlerror.html"></HEAD
Daniel Veillardb732a0e2000-10-15 11:27:01 +000020><BODY
21BGCOLOR="#FFFFFF"
22TEXT="#000000"
Daniel Veillard503b8932001-01-05 06:36:31 +000023LINK="#0000FF"
24VLINK="#840084"
25ALINK="#0000FF"
Daniel Veillardb732a0e2000-10-15 11:27:01 +000026><DIV
27CLASS="NAVHEADER"
28><TABLE
29WIDTH="100%"
30BORDER="0"
31BGCOLOR="#000000"
32CELLPADDING="1"
33CELLSPACING="0"
34><TR
35><TH
36COLSPAN="4"
37ALIGN="center"
38><FONT
39COLOR="#FFFFFF"
40SIZE="5"
41>Gnome XML Library Reference Manual</FONT
42></TH
43></TR
44><TR
45><TD
46WIDTH="25%"
47BGCOLOR="#C00000"
48ALIGN="left"
49><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +000050HREF="libxml-valid.html"
Daniel Veillardb732a0e2000-10-15 11:27:01 +000051><FONT
52COLOR="#FFFFFF"
53SIZE="3"
54><B
55>&#60;&#60;&#60; Previous Page</B
56></FONT
57></A
58></TD
59><TD
60WIDTH="25%"
61BGCOLOR="#0000C0"
62ALIGN="center"
63><FONT
64COLOR="#FFFFFF"
65SIZE="3"
66><B
67><A
68HREF="book1.html"
69><FONT
70COLOR="#FFFFFF"
71SIZE="3"
72><B
73>Home</B
74></FONT
75></A
76></B
77></FONT
78></TD
79><TD
80WIDTH="25%"
81BGCOLOR="#00C000"
82ALIGN="center"
83><FONT
84COLOR="#FFFFFF"
85SIZE="3"
86><B
87><A
88HREF="libxml-lib.html"
89><FONT
90COLOR="#FFFFFF"
91SIZE="3"
92><B
93>Up</B
94></FONT
95></A
96></B
97></FONT
98></TD
99><TD
100WIDTH="25%"
101BGCOLOR="#C00000"
102ALIGN="right"
103><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000104HREF="libxml-xmlerror.html"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000105><FONT
106COLOR="#FFFFFF"
107SIZE="3"
108><B
109>Next Page &#62;&#62;&#62;</B
110></FONT
111></A
112></TD
113></TR
114></TABLE
115></DIV
116><H1
Daniel Veillard503b8932001-01-05 06:36:31 +0000117><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000118NAME="LIBXML-URI"
Daniel Veillard503b8932001-01-05 06:36:31 +0000119>uri</A
120></H1
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000121><DIV
122CLASS="REFNAMEDIV"
123><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000124NAME="AEN9602"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000125></A
126><H2
127>Name</H2
Daniel Veillard503b8932001-01-05 06:36:31 +0000128>uri&nbsp;--&nbsp;</DIV
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000129><DIV
130CLASS="REFSYNOPSISDIV"
131><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000132NAME="AEN9605"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000133></A
134><H2
135>Synopsis</H2
136><TABLE
137BORDER="0"
138BGCOLOR="#D6E8FF"
139WIDTH="100%"
140CELLPADDING="6"
141><TR
142><TD
143><PRE
144CLASS="SYNOPSIS"
145>&#13;
146
147struct <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000148HREF="libxml-uri.html#XMLURI"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000149>xmlURI</A
150>;
151typedef <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000152HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000153>xmlURIPtr</A
154>;
155<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000156HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000157>xmlURIPtr</A
158> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000159HREF="libxml-uri.html#XMLCREATEURI"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000160>xmlCreateURI</A
161> (void);
162<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000163HREF="libxml-tree.html#XMLCHAR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000164>xmlChar</A
165>* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000166HREF="libxml-uri.html#XMLBUILDURI"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000167>xmlBuildURI</A
168> (const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000169HREF="libxml-tree.html#XMLCHAR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000170>xmlChar</A
171> *URI,
172 const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000173HREF="libxml-tree.html#XMLCHAR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000174>xmlChar</A
175> *base);
176<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000177HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000178>xmlURIPtr</A
179> <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000180HREF="libxml-uri.html#XMLPARSEURI"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000181>xmlParseURI</A
182> (const char *URI);
183int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000184HREF="libxml-uri.html#XMLPARSEURIREFERENCE"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000185>xmlParseURIReference</A
186> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000187HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000188>xmlURIPtr</A
189> uri,
190 const char *str);
191<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000192HREF="libxml-tree.html#XMLCHAR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000193>xmlChar</A
194>* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000195HREF="libxml-uri.html#XMLSAVEURI"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000196>xmlSaveUri</A
197> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000198HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000199>xmlURIPtr</A
200> uri);
201void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000202HREF="libxml-uri.html#XMLPRINTURI"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000203>xmlPrintURI</A
204> (<GTKDOCLINK
Daniel Veillard503b8932001-01-05 06:36:31 +0000205HREF="FILE-CAPS"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000206>FILE</GTKDOCLINK
207> *stream,
208 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000209HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000210>xmlURIPtr</A
211> uri);
212char* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000213HREF="libxml-uri.html#XMLURIUNESCAPESTRING"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000214>xmlURIUnescapeString</A
215> (const char *str,
216 int len,
217 char *target);
218int <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000219HREF="libxml-uri.html#XMLNORMALIZEURIPATH"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000220>xmlNormalizeURIPath</A
221> (char *path);
Daniel Veillard28929b22000-11-13 18:22:49 +0000222<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000223HREF="libxml-tree.html#XMLCHAR"
Daniel Veillard28929b22000-11-13 18:22:49 +0000224>xmlChar</A
225>* <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000226HREF="libxml-uri.html#XMLURIESCAPE"
Daniel Veillard28929b22000-11-13 18:22:49 +0000227>xmlURIEscape</A
228> (const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000229HREF="libxml-tree.html#XMLCHAR"
Daniel Veillard28929b22000-11-13 18:22:49 +0000230>xmlChar</A
231> *str);
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000232void <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000233HREF="libxml-uri.html#XMLFREEURI"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000234>xmlFreeURI</A
235> (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000236HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000237>xmlURIPtr</A
238> uri);</PRE
239></TD
240></TR
241></TABLE
242></DIV
243><DIV
244CLASS="REFSECT1"
245><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000246NAME="AEN9633"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000247></A
248><H2
249>Description</H2
250><P
251></P
252></DIV
253><DIV
254CLASS="REFSECT1"
255><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000256NAME="AEN9636"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000257></A
258><H2
259>Details</H2
260><DIV
261CLASS="REFSECT2"
262><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000263NAME="AEN9638"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000264></A
265><H3
266><A
267NAME="XMLURI"
268></A
269>struct xmlURI</H3
270><TABLE
271BORDER="0"
272BGCOLOR="#D6E8FF"
273WIDTH="100%"
274CELLPADDING="6"
275><TR
276><TD
277><PRE
278CLASS="PROGRAMLISTING"
279>struct xmlURI {
280 char *scheme;
281 char *opaque;
282 char *authority;
283 char *server;
284 char *user;
285 int port;
286 char *path;
287 char *query;
288 char *fragment;
289};</PRE
290></TD
291></TR
292></TABLE
293><P
294></P
295></DIV
296><HR><DIV
297CLASS="REFSECT2"
298><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000299NAME="AEN9643"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000300></A
301><H3
302><A
303NAME="XMLURIPTR"
304></A
305>xmlURIPtr</H3
306><TABLE
307BORDER="0"
308BGCOLOR="#D6E8FF"
309WIDTH="100%"
310CELLPADDING="6"
311><TR
312><TD
313><PRE
314CLASS="PROGRAMLISTING"
315>typedef xmlURI *xmlURIPtr;</PRE
316></TD
317></TR
318></TABLE
319><P
320></P
321></DIV
322><HR><DIV
323CLASS="REFSECT2"
324><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000325NAME="AEN9648"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000326></A
327><H3
328><A
329NAME="XMLCREATEURI"
330></A
331>xmlCreateURI ()</H3
332><TABLE
333BORDER="0"
334BGCOLOR="#D6E8FF"
335WIDTH="100%"
336CELLPADDING="6"
337><TR
338><TD
339><PRE
340CLASS="PROGRAMLISTING"
341><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000342HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000343>xmlURIPtr</A
344> xmlCreateURI (void);</PRE
345></TD
346></TR
347></TABLE
348><P
349>Simply creates an empty xmlURI</P
350><P
351></P
352><DIV
353CLASS="INFORMALTABLE"
354><P
355></P
356><TABLE
357BORDER="0"
358WIDTH="100%"
359BGCOLOR="#FFD0D0"
360CELLSPACING="0"
361CELLPADDING="4"
362CLASS="CALSTABLE"
363><TR
364><TD
365WIDTH="20%"
366ALIGN="RIGHT"
367VALIGN="TOP"
368><I
369CLASS="EMPHASIS"
370>Returns</I
371> :</TD
372><TD
373WIDTH="80%"
374ALIGN="LEFT"
375VALIGN="TOP"
376>the new structure or NULL in case of error</TD
377></TR
378></TABLE
379><P
380></P
381></DIV
382></DIV
383><HR><DIV
384CLASS="REFSECT2"
385><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000386NAME="AEN9664"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000387></A
388><H3
389><A
390NAME="XMLBUILDURI"
391></A
392>xmlBuildURI ()</H3
393><TABLE
394BORDER="0"
395BGCOLOR="#D6E8FF"
396WIDTH="100%"
397CELLPADDING="6"
398><TR
399><TD
400><PRE
401CLASS="PROGRAMLISTING"
402><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000403HREF="libxml-tree.html#XMLCHAR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000404>xmlChar</A
405>* xmlBuildURI (const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000406HREF="libxml-tree.html#XMLCHAR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000407>xmlChar</A
408> *URI,
409 const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000410HREF="libxml-tree.html#XMLCHAR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000411>xmlChar</A
412> *base);</PRE
413></TD
414></TR
415></TABLE
416><P
417>Computes he final URI of the reference done by checking that
418the given URI is valid, and building the final URI using the
419base URI. This is processed according to section 5.2 of the
420RFC 2396</P
421><P
422>5.2. Resolving Relative References to Absolute Form</P
423><P
424></P
425><DIV
426CLASS="INFORMALTABLE"
427><P
428></P
429><TABLE
430BORDER="0"
431WIDTH="100%"
432BGCOLOR="#FFD0D0"
433CELLSPACING="0"
434CELLPADDING="4"
435CLASS="CALSTABLE"
436><TR
437><TD
438WIDTH="20%"
439ALIGN="RIGHT"
440VALIGN="TOP"
441><TT
442CLASS="PARAMETER"
443><I
444>URI</I
445></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000446>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000447><TD
448WIDTH="80%"
449ALIGN="LEFT"
450VALIGN="TOP"
451> the URI instance found in the document</TD
452></TR
453><TR
454><TD
455WIDTH="20%"
456ALIGN="RIGHT"
457VALIGN="TOP"
458><TT
459CLASS="PARAMETER"
460><I
461>base</I
462></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000463>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000464><TD
465WIDTH="80%"
466ALIGN="LEFT"
467VALIGN="TOP"
468> the base value</TD
469></TR
470><TR
471><TD
472WIDTH="20%"
473ALIGN="RIGHT"
474VALIGN="TOP"
475><I
476CLASS="EMPHASIS"
477>Returns</I
478> :</TD
479><TD
480WIDTH="80%"
481ALIGN="LEFT"
482VALIGN="TOP"
483>a new URI string (to be freed by the caller) or NULL in case
484of error.</TD
485></TR
486></TABLE
487><P
488></P
489></DIV
490></DIV
491><HR><DIV
492CLASS="REFSECT2"
493><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000494NAME="AEN9691"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000495></A
496><H3
497><A
498NAME="XMLPARSEURI"
499></A
500>xmlParseURI ()</H3
501><TABLE
502BORDER="0"
503BGCOLOR="#D6E8FF"
504WIDTH="100%"
505CELLPADDING="6"
506><TR
507><TD
508><PRE
509CLASS="PROGRAMLISTING"
510><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000511HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000512>xmlURIPtr</A
513> xmlParseURI (const char *URI);</PRE
514></TD
515></TR
516></TABLE
517><P
518>Parse an URI </P
519><P
520>URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]</P
521><P
522></P
523><DIV
524CLASS="INFORMALTABLE"
525><P
526></P
527><TABLE
528BORDER="0"
529WIDTH="100%"
530BGCOLOR="#FFD0D0"
531CELLSPACING="0"
532CELLPADDING="4"
533CLASS="CALSTABLE"
534><TR
535><TD
536WIDTH="20%"
537ALIGN="RIGHT"
538VALIGN="TOP"
539><TT
540CLASS="PARAMETER"
541><I
542>URI</I
543></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000544>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000545><TD
546WIDTH="80%"
547ALIGN="LEFT"
548VALIGN="TOP"
549>&nbsp;</TD
550></TR
551><TR
552><TD
553WIDTH="20%"
554ALIGN="RIGHT"
555VALIGN="TOP"
556><I
557CLASS="EMPHASIS"
558>Returns</I
559> :</TD
560><TD
561WIDTH="80%"
562ALIGN="LEFT"
563VALIGN="TOP"
564>a newly build xmlURIPtr or NULL in case of error</TD
565></TR
566></TABLE
567><P
568></P
569></DIV
570></DIV
571><HR><DIV
572CLASS="REFSECT2"
573><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000574NAME="AEN9712"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000575></A
576><H3
577><A
578NAME="XMLPARSEURIREFERENCE"
579></A
580>xmlParseURIReference ()</H3
581><TABLE
582BORDER="0"
583BGCOLOR="#D6E8FF"
584WIDTH="100%"
585CELLPADDING="6"
586><TR
587><TD
588><PRE
589CLASS="PROGRAMLISTING"
590>int xmlParseURIReference (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000591HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000592>xmlURIPtr</A
593> uri,
594 const char *str);</PRE
595></TD
596></TR
597></TABLE
598><P
599>Parse an URI reference string and fills in the appropriate fields
600of the <TT
601CLASS="PARAMETER"
602><I
603>uri</I
604></TT
605> structure</P
606><P
607>URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]</P
608><P
609></P
610><DIV
611CLASS="INFORMALTABLE"
612><P
613></P
614><TABLE
615BORDER="0"
616WIDTH="100%"
617BGCOLOR="#FFD0D0"
618CELLSPACING="0"
619CELLPADDING="4"
620CLASS="CALSTABLE"
621><TR
622><TD
623WIDTH="20%"
624ALIGN="RIGHT"
625VALIGN="TOP"
626><TT
627CLASS="PARAMETER"
628><I
629>uri</I
630></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000631>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000632><TD
633WIDTH="80%"
634ALIGN="LEFT"
635VALIGN="TOP"
636> pointer to an URI structure</TD
637></TR
638><TR
639><TD
640WIDTH="20%"
641ALIGN="RIGHT"
642VALIGN="TOP"
643><TT
644CLASS="PARAMETER"
645><I
646>str</I
647></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000648>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000649><TD
650WIDTH="80%"
651ALIGN="LEFT"
652VALIGN="TOP"
653> the string to analyze</TD
654></TR
655><TR
656><TD
657WIDTH="20%"
658ALIGN="RIGHT"
659VALIGN="TOP"
660><I
661CLASS="EMPHASIS"
662>Returns</I
663> :</TD
664><TD
665WIDTH="80%"
666ALIGN="LEFT"
667VALIGN="TOP"
668>0 or the error code</TD
669></TR
670></TABLE
671><P
672></P
673></DIV
674></DIV
675><HR><DIV
676CLASS="REFSECT2"
677><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000678NAME="AEN9738"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000679></A
680><H3
681><A
682NAME="XMLSAVEURI"
683></A
684>xmlSaveUri ()</H3
685><TABLE
686BORDER="0"
687BGCOLOR="#D6E8FF"
688WIDTH="100%"
689CELLPADDING="6"
690><TR
691><TD
692><PRE
693CLASS="PROGRAMLISTING"
694><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000695HREF="libxml-tree.html#XMLCHAR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000696>xmlChar</A
697>* xmlSaveUri (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000698HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000699>xmlURIPtr</A
700> uri);</PRE
701></TD
702></TR
703></TABLE
704><P
705>Save the URI as an escaped string</P
706><P
707></P
708><DIV
709CLASS="INFORMALTABLE"
710><P
711></P
712><TABLE
713BORDER="0"
714WIDTH="100%"
715BGCOLOR="#FFD0D0"
716CELLSPACING="0"
717CELLPADDING="4"
718CLASS="CALSTABLE"
719><TR
720><TD
721WIDTH="20%"
722ALIGN="RIGHT"
723VALIGN="TOP"
724><TT
725CLASS="PARAMETER"
726><I
727>uri</I
728></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000729>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000730><TD
731WIDTH="80%"
732ALIGN="LEFT"
733VALIGN="TOP"
734> pointer to an xmlURI</TD
735></TR
736><TR
737><TD
738WIDTH="20%"
739ALIGN="RIGHT"
740VALIGN="TOP"
741><I
742CLASS="EMPHASIS"
743>Returns</I
744> :</TD
745><TD
746WIDTH="80%"
747ALIGN="LEFT"
748VALIGN="TOP"
749>a new string (to be deallocated by caller)</TD
750></TR
751></TABLE
752><P
753></P
754></DIV
755></DIV
756><HR><DIV
757CLASS="REFSECT2"
758><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000759NAME="AEN9759"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000760></A
761><H3
762><A
763NAME="XMLPRINTURI"
764></A
765>xmlPrintURI ()</H3
766><TABLE
767BORDER="0"
768BGCOLOR="#D6E8FF"
769WIDTH="100%"
770CELLPADDING="6"
771><TR
772><TD
773><PRE
774CLASS="PROGRAMLISTING"
775>void xmlPrintURI (<GTKDOCLINK
Daniel Veillard503b8932001-01-05 06:36:31 +0000776HREF="FILE-CAPS"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000777>FILE</GTKDOCLINK
778> *stream,
779 <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +0000780HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000781>xmlURIPtr</A
782> uri);</PRE
783></TD
784></TR
785></TABLE
786><P
787>Prints the URI in the stream <TT
788CLASS="PARAMETER"
789><I
790>steam</I
791></TT
792>.</P
793><P
794></P
795><DIV
796CLASS="INFORMALTABLE"
797><P
798></P
799><TABLE
800BORDER="0"
801WIDTH="100%"
802BGCOLOR="#FFD0D0"
803CELLSPACING="0"
804CELLPADDING="4"
805CLASS="CALSTABLE"
806><TR
807><TD
808WIDTH="20%"
809ALIGN="RIGHT"
810VALIGN="TOP"
811><TT
812CLASS="PARAMETER"
813><I
814>stream</I
815></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000816>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000817><TD
818WIDTH="80%"
819ALIGN="LEFT"
820VALIGN="TOP"
821> a FILE* for the output</TD
822></TR
823><TR
824><TD
825WIDTH="20%"
826ALIGN="RIGHT"
827VALIGN="TOP"
828><TT
829CLASS="PARAMETER"
830><I
831>uri</I
832></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000833>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000834><TD
835WIDTH="80%"
836ALIGN="LEFT"
837VALIGN="TOP"
838> pointer to an xmlURI</TD
839></TR
840></TABLE
841><P
842></P
843></DIV
844></DIV
845><HR><DIV
846CLASS="REFSECT2"
847><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000848NAME="AEN9781"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000849></A
850><H3
851><A
852NAME="XMLURIUNESCAPESTRING"
853></A
854>xmlURIUnescapeString ()</H3
855><TABLE
856BORDER="0"
857BGCOLOR="#D6E8FF"
858WIDTH="100%"
859CELLPADDING="6"
860><TR
861><TD
862><PRE
863CLASS="PROGRAMLISTING"
864>char* xmlURIUnescapeString (const char *str,
865 int len,
866 char *target);</PRE
867></TD
868></TR
869></TABLE
870><P
871>Unescaping routine, does not do validity checks !
872Output is direct unsigned char translation of <TT
873CLASS="LITERAL"
874>XX</TT
875> values (no encoding)</P
876><P
877></P
878><DIV
879CLASS="INFORMALTABLE"
880><P
881></P
882><TABLE
883BORDER="0"
884WIDTH="100%"
885BGCOLOR="#FFD0D0"
886CELLSPACING="0"
887CELLPADDING="4"
888CLASS="CALSTABLE"
889><TR
890><TD
891WIDTH="20%"
892ALIGN="RIGHT"
893VALIGN="TOP"
894><TT
895CLASS="PARAMETER"
896><I
897>str</I
898></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000899>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000900><TD
901WIDTH="80%"
902ALIGN="LEFT"
903VALIGN="TOP"
904> the string to unescape</TD
905></TR
906><TR
907><TD
908WIDTH="20%"
909ALIGN="RIGHT"
910VALIGN="TOP"
911><TT
912CLASS="PARAMETER"
913><I
914>len</I
915></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000916>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000917><TD
918WIDTH="80%"
919ALIGN="LEFT"
920VALIGN="TOP"
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000921> the lenght in bytes to unescape (or &lt;= 0 to indicate full string)</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000922></TR
923><TR
924><TD
925WIDTH="20%"
926ALIGN="RIGHT"
927VALIGN="TOP"
928><TT
929CLASS="PARAMETER"
930><I
931>target</I
932></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000933>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000934><TD
935WIDTH="80%"
936ALIGN="LEFT"
937VALIGN="TOP"
938> optionnal destination buffer</TD
939></TR
940><TR
941><TD
942WIDTH="20%"
943ALIGN="RIGHT"
944VALIGN="TOP"
945><I
946CLASS="EMPHASIS"
947>Returns</I
948> :</TD
949><TD
950WIDTH="80%"
951ALIGN="LEFT"
952VALIGN="TOP"
953>an copy of the string, but unescaped</TD
954></TR
955></TABLE
956><P
957></P
958></DIV
959></DIV
960><HR><DIV
961CLASS="REFSECT2"
962><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +0000963NAME="AEN9809"
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000964></A
965><H3
966><A
967NAME="XMLNORMALIZEURIPATH"
968></A
969>xmlNormalizeURIPath ()</H3
970><TABLE
971BORDER="0"
972BGCOLOR="#D6E8FF"
973WIDTH="100%"
974CELLPADDING="6"
975><TR
976><TD
977><PRE
978CLASS="PROGRAMLISTING"
979>int xmlNormalizeURIPath (char *path);</PRE
980></TD
981></TR
982></TABLE
983><P
Daniel Veillardd194dd22001-02-14 10:37:43 +0000984>Applies the 5 normalization steps to a path string--that is, RFC 2396
985Section 5.2, steps 6.c through 6.g.</P
986><P
987>Normalization occurs directly on the string, no new allocation is done</P
Daniel Veillardb732a0e2000-10-15 11:27:01 +0000988><P
989></P
990><DIV
991CLASS="INFORMALTABLE"
992><P
993></P
994><TABLE
995BORDER="0"
996WIDTH="100%"
997BGCOLOR="#FFD0D0"
998CELLSPACING="0"
999CELLPADDING="4"
1000CLASS="CALSTABLE"
1001><TR
1002><TD
1003WIDTH="20%"
1004ALIGN="RIGHT"
1005VALIGN="TOP"
1006><TT
1007CLASS="PARAMETER"
1008><I
1009>path</I
1010></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001011>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001012><TD
1013WIDTH="80%"
1014ALIGN="LEFT"
1015VALIGN="TOP"
1016> pointer to the path string</TD
1017></TR
1018><TR
1019><TD
1020WIDTH="20%"
1021ALIGN="RIGHT"
1022VALIGN="TOP"
1023><I
1024CLASS="EMPHASIS"
1025>Returns</I
1026> :</TD
1027><TD
1028WIDTH="80%"
1029ALIGN="LEFT"
1030VALIGN="TOP"
1031>0 or an error code</TD
1032></TR
1033></TABLE
1034><P
1035></P
1036></DIV
1037></DIV
1038><HR><DIV
1039CLASS="REFSECT2"
1040><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001041NAME="AEN9829"
Daniel Veillard28929b22000-11-13 18:22:49 +00001042></A
1043><H3
1044><A
1045NAME="XMLURIESCAPE"
1046></A
1047>xmlURIEscape ()</H3
1048><TABLE
1049BORDER="0"
1050BGCOLOR="#D6E8FF"
1051WIDTH="100%"
1052CELLPADDING="6"
1053><TR
1054><TD
1055><PRE
1056CLASS="PROGRAMLISTING"
1057><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001058HREF="libxml-tree.html#XMLCHAR"
Daniel Veillard28929b22000-11-13 18:22:49 +00001059>xmlChar</A
1060>* xmlURIEscape (const <A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001061HREF="libxml-tree.html#XMLCHAR"
Daniel Veillard28929b22000-11-13 18:22:49 +00001062>xmlChar</A
1063> *str);</PRE
1064></TD
1065></TR
1066></TABLE
1067><P
1068>Escaping routine, does not do validity checks !
1069It will try to escape the chars needing this, but this is heuristic
1070based it's impossible to be sure.</P
1071><P
Daniel Veillardc7ad7ce2001-03-22 21:45:29 +00001072>TODO: make the proper implementation of this function by calling
1073<A
1074HREF="libxml-uri.html#XMLPARSEURIREFERENCE"
1075>xmlParseURIReference</A
1076>() and escaping each section accordingly
1077to the rules (c.f. bug 51876)</P
1078><P
Daniel Veillard28929b22000-11-13 18:22:49 +00001079></P
1080><DIV
1081CLASS="INFORMALTABLE"
1082><P
1083></P
1084><TABLE
1085BORDER="0"
1086WIDTH="100%"
1087BGCOLOR="#FFD0D0"
1088CELLSPACING="0"
1089CELLPADDING="4"
1090CLASS="CALSTABLE"
1091><TR
1092><TD
1093WIDTH="20%"
1094ALIGN="RIGHT"
1095VALIGN="TOP"
1096><TT
1097CLASS="PARAMETER"
1098><I
1099>str</I
1100></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001101>&nbsp;:</TD
Daniel Veillard28929b22000-11-13 18:22:49 +00001102><TD
1103WIDTH="80%"
1104ALIGN="LEFT"
1105VALIGN="TOP"
1106> the string of the URI to escape</TD
1107></TR
1108><TR
1109><TD
1110WIDTH="20%"
1111ALIGN="RIGHT"
1112VALIGN="TOP"
1113><I
1114CLASS="EMPHASIS"
1115>Returns</I
1116> :</TD
1117><TD
1118WIDTH="80%"
1119ALIGN="LEFT"
1120VALIGN="TOP"
1121>an copy of the string, but escaped</TD
1122></TR
1123></TABLE
1124><P
1125></P
1126></DIV
1127></DIV
1128><HR><DIV
1129CLASS="REFSECT2"
1130><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001131NAME="AEN9852"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001132></A
1133><H3
1134><A
1135NAME="XMLFREEURI"
1136></A
1137>xmlFreeURI ()</H3
1138><TABLE
1139BORDER="0"
1140BGCOLOR="#D6E8FF"
1141WIDTH="100%"
1142CELLPADDING="6"
1143><TR
1144><TD
1145><PRE
1146CLASS="PROGRAMLISTING"
1147>void xmlFreeURI (<A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001148HREF="libxml-uri.html#XMLURIPTR"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001149>xmlURIPtr</A
1150> uri);</PRE
1151></TD
1152></TR
1153></TABLE
1154><P
1155>Free up the xmlURI struct</P
1156><P
1157></P
1158><DIV
1159CLASS="INFORMALTABLE"
1160><P
1161></P
1162><TABLE
1163BORDER="0"
1164WIDTH="100%"
1165BGCOLOR="#FFD0D0"
1166CELLSPACING="0"
1167CELLPADDING="4"
1168CLASS="CALSTABLE"
1169><TR
1170><TD
1171WIDTH="20%"
1172ALIGN="RIGHT"
1173VALIGN="TOP"
1174><TT
1175CLASS="PARAMETER"
1176><I
1177>uri</I
1178></TT
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001179>&nbsp;:</TD
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001180><TD
1181WIDTH="80%"
1182ALIGN="LEFT"
1183VALIGN="TOP"
1184> pointer to an xmlURI</TD
1185></TR
1186></TABLE
1187><P
1188></P
1189></DIV
1190></DIV
1191></DIV
1192><DIV
1193CLASS="NAVFOOTER"
1194><BR
1195CLEAR="all"><BR><TABLE
1196WIDTH="100%"
1197BORDER="0"
1198BGCOLOR="#000000"
1199CELLPADDING="1"
1200CELLSPACING="0"
1201><TR
1202><TD
1203WIDTH="25%"
1204BGCOLOR="#C00000"
1205ALIGN="left"
1206><A
Daniel Veillard9cb5ff42001-01-29 08:22:21 +00001207HREF="libxml-valid.html"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001208><FONT
1209COLOR="#FFFFFF"
1210SIZE="3"
1211><B
1212>&#60;&#60;&#60; Previous Page</B
1213></FONT
1214></A
1215></TD
1216><TD
1217WIDTH="25%"
1218BGCOLOR="#0000C0"
1219ALIGN="center"
1220><FONT
1221COLOR="#FFFFFF"
1222SIZE="3"
1223><B
1224><A
1225HREF="book1.html"
1226><FONT
1227COLOR="#FFFFFF"
1228SIZE="3"
1229><B
1230>Home</B
1231></FONT
1232></A
1233></B
1234></FONT
1235></TD
1236><TD
1237WIDTH="25%"
1238BGCOLOR="#00C000"
1239ALIGN="center"
1240><FONT
1241COLOR="#FFFFFF"
1242SIZE="3"
1243><B
1244><A
1245HREF="libxml-lib.html"
1246><FONT
1247COLOR="#FFFFFF"
1248SIZE="3"
1249><B
1250>Up</B
1251></FONT
1252></A
1253></B
1254></FONT
1255></TD
1256><TD
1257WIDTH="25%"
1258BGCOLOR="#C00000"
1259ALIGN="right"
1260><A
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001261HREF="libxml-xmlerror.html"
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001262><FONT
1263COLOR="#FFFFFF"
1264SIZE="3"
1265><B
1266>Next Page &#62;&#62;&#62;</B
1267></FONT
1268></A
1269></TD
1270></TR
1271><TR
1272><TD
1273COLSPAN="2"
1274ALIGN="left"
1275><FONT
1276COLOR="#FFFFFF"
1277SIZE="3"
1278><B
1279>valid</B
1280></FONT
1281></TD
1282><TD
1283COLSPAN="2"
1284ALIGN="right"
1285><FONT
1286COLOR="#FFFFFF"
1287SIZE="3"
1288><B
Daniel Veillard3bbbe6f2001-05-03 11:15:37 +00001289>xmlerror</B
Daniel Veillardb732a0e2000-10-15 11:27:01 +00001290></FONT
1291></TD
1292></TR
1293></TABLE
1294></DIV
1295></BODY
1296></HTML
1297>