libxml-uri.html revision 5ede35e3bf51ead64928a223792ae4ee1ca836ba
1<HTML 2><HEAD 3><TITLE 4>uri</TITLE 5><META 6NAME="GENERATOR" 7CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ 8"><LINK 9REL="HOME" 10TITLE="Gnome XML Library Reference Manual" 11HREF="book1.html"><LINK 12REL="UP" 13TITLE="Libxml Library Reference" 14HREF="libxml-lib.html"><LINK 15REL="PREVIOUS" 16TITLE="valid" 17HREF="libxml-valid.html"><LINK 18REL="NEXT" 19TITLE="xmlerror" 20HREF="libxml-xmlerror.html"></HEAD 21><BODY 22CLASS="REFENTRY" 23BGCOLOR="#FFFFFF" 24TEXT="#000000" 25LINK="#0000FF" 26VLINK="#840084" 27ALINK="#0000FF" 28><DIV 29CLASS="NAVHEADER" 30><TABLE 31WIDTH="100%" 32BORDER="0" 33BGCOLOR="#000000" 34CELLPADDING="1" 35CELLSPACING="0" 36><TR 37><TH 38COLSPAN="4" 39ALIGN="center" 40><FONT 41COLOR="#FFFFFF" 42SIZE="5" 43>Gnome XML Library Reference Manual</FONT 44></TH 45></TR 46><TR 47><TD 48WIDTH="25%" 49BGCOLOR="#C00000" 50ALIGN="left" 51><A 52HREF="libxml-valid.html" 53><FONT 54COLOR="#FFFFFF" 55SIZE="3" 56><B 57><<< Previous Page</B 58></FONT 59></A 60></TD 61><TD 62WIDTH="25%" 63BGCOLOR="#0000C0" 64ALIGN="center" 65><FONT 66COLOR="#FFFFFF" 67SIZE="3" 68><B 69><A 70HREF="book1.html" 71><FONT 72COLOR="#FFFFFF" 73SIZE="3" 74><B 75>Home</B 76></FONT 77></A 78></B 79></FONT 80></TD 81><TD 82WIDTH="25%" 83BGCOLOR="#00C000" 84ALIGN="center" 85><FONT 86COLOR="#FFFFFF" 87SIZE="3" 88><B 89><A 90HREF="libxml-lib.html" 91><FONT 92COLOR="#FFFFFF" 93SIZE="3" 94><B 95>Up</B 96></FONT 97></A 98></B 99></FONT 100></TD 101><TD 102WIDTH="25%" 103BGCOLOR="#C00000" 104ALIGN="right" 105><A 106HREF="libxml-xmlerror.html" 107><FONT 108COLOR="#FFFFFF" 109SIZE="3" 110><B 111>Next Page >>></B 112></FONT 113></A 114></TD 115></TR 116></TABLE 117></DIV 118><H1 119><A 120NAME="LIBXML-URI">uri</H1 121><DIV 122CLASS="REFNAMEDIV" 123><A 124NAME="AEN10662" 125></A 126><H2 127>Name</H2 128>uri -- </DIV 129><DIV 130CLASS="REFSYNOPSISDIV" 131><A 132NAME="AEN10665"><H2 133>Synopsis</H2 134><TABLE 135BORDER="0" 136BGCOLOR="#D6E8FF" 137WIDTH="100%" 138CELLPADDING="6" 139><TR 140><TD 141><PRE 142CLASS="SYNOPSIS" 143> 144 145struct <A 146HREF="libxml-uri.html#XMLURI" 147>xmlURI</A 148>; 149typedef <A 150HREF="libxml-uri.html#XMLURIPTR" 151>xmlURIPtr</A 152>; 153<A 154HREF="libxml-uri.html#XMLURIPTR" 155>xmlURIPtr</A 156> <A 157HREF="libxml-uri.html#XMLCREATEURI" 158>xmlCreateURI</A 159> (void); 160<A 161HREF="libxml-tree.html#XMLCHAR" 162>xmlChar</A 163>* <A 164HREF="libxml-uri.html#XMLBUILDURI" 165>xmlBuildURI</A 166> (const <A 167HREF="libxml-tree.html#XMLCHAR" 168>xmlChar</A 169> *URI, 170 const <A 171HREF="libxml-tree.html#XMLCHAR" 172>xmlChar</A 173> *base); 174<A 175HREF="libxml-uri.html#XMLURIPTR" 176>xmlURIPtr</A 177> <A 178HREF="libxml-uri.html#XMLPARSEURI" 179>xmlParseURI</A 180> (const char *str); 181int <A 182HREF="libxml-uri.html#XMLPARSEURIREFERENCE" 183>xmlParseURIReference</A 184> (<A 185HREF="libxml-uri.html#XMLURIPTR" 186>xmlURIPtr</A 187> uri, 188 const char *str); 189<A 190HREF="libxml-tree.html#XMLCHAR" 191>xmlChar</A 192>* <A 193HREF="libxml-uri.html#XMLSAVEURI" 194>xmlSaveUri</A 195> (<A 196HREF="libxml-uri.html#XMLURIPTR" 197>xmlURIPtr</A 198> uri); 199void <A 200HREF="libxml-uri.html#XMLPRINTURI" 201>xmlPrintURI</A 202> (<GTKDOCLINK 203HREF="FILE-CAPS" 204>FILE</GTKDOCLINK 205> *stream, 206 <A 207HREF="libxml-uri.html#XMLURIPTR" 208>xmlURIPtr</A 209> uri); 210<A 211HREF="libxml-tree.html#XMLCHAR" 212>xmlChar</A 213>* <A 214HREF="libxml-uri.html#XMLURIESCAPESTR" 215>xmlURIEscapeStr</A 216> (const <A 217HREF="libxml-tree.html#XMLCHAR" 218>xmlChar</A 219> *str, 220 const <A 221HREF="libxml-tree.html#XMLCHAR" 222>xmlChar</A 223> *list); 224char* <A 225HREF="libxml-uri.html#XMLURIUNESCAPESTRING" 226>xmlURIUnescapeString</A 227> (const char *str, 228 int len, 229 char *target); 230int <A 231HREF="libxml-uri.html#XMLNORMALIZEURIPATH" 232>xmlNormalizeURIPath</A 233> (char *path); 234<A 235HREF="libxml-tree.html#XMLCHAR" 236>xmlChar</A 237>* <A 238HREF="libxml-uri.html#XMLURIESCAPE" 239>xmlURIEscape</A 240> (const <A 241HREF="libxml-tree.html#XMLCHAR" 242>xmlChar</A 243> *str); 244void <A 245HREF="libxml-uri.html#XMLFREEURI" 246>xmlFreeURI</A 247> (<A 248HREF="libxml-uri.html#XMLURIPTR" 249>xmlURIPtr</A 250> uri);</PRE 251></TD 252></TR 253></TABLE 254></DIV 255><DIV 256CLASS="REFSECT1" 257><A 258NAME="AEN10697" 259></A 260><H2 261>Description</H2 262><P 263></P 264></DIV 265><DIV 266CLASS="REFSECT1" 267><A 268NAME="AEN10700" 269></A 270><H2 271>Details</H2 272><DIV 273CLASS="REFSECT2" 274><A 275NAME="AEN10702" 276></A 277><H3 278><A 279NAME="XMLURI" 280></A 281>struct xmlURI</H3 282><TABLE 283BORDER="0" 284BGCOLOR="#D6E8FF" 285WIDTH="100%" 286CELLPADDING="6" 287><TR 288><TD 289><PRE 290CLASS="PROGRAMLISTING" 291>struct xmlURI { 292 char *scheme; /* the URI scheme */ 293 char *opaque; /* opaque part */ 294 char *authority; /* the authority part */ 295 char *server; /* the server part */ 296 char *user; /* the user part */ 297 int port; /* the port number */ 298 char *path; /* the path string */ 299 char *query; /* the query string */ 300 char *fragment; /* the fragment identifier */ 301 int cleanup; /* parsing potentially unclean URI */ 302};</PRE 303></TD 304></TR 305></TABLE 306><P 307>A parsed URI reference. This is a struct containing the various fields 308as described in RFC 2396 but separated for further processing.</P 309><P 310></P 311></DIV 312><HR><DIV 313CLASS="REFSECT2" 314><A 315NAME="AEN10708" 316></A 317><H3 318><A 319NAME="XMLURIPTR" 320></A 321>xmlURIPtr</H3 322><TABLE 323BORDER="0" 324BGCOLOR="#D6E8FF" 325WIDTH="100%" 326CELLPADDING="6" 327><TR 328><TD 329><PRE 330CLASS="PROGRAMLISTING" 331>typedef xmlURI *xmlURIPtr;</PRE 332></TD 333></TR 334></TABLE 335><P 336></P 337></DIV 338><HR><DIV 339CLASS="REFSECT2" 340><A 341NAME="AEN10713" 342></A 343><H3 344><A 345NAME="XMLCREATEURI" 346></A 347>xmlCreateURI ()</H3 348><TABLE 349BORDER="0" 350BGCOLOR="#D6E8FF" 351WIDTH="100%" 352CELLPADDING="6" 353><TR 354><TD 355><PRE 356CLASS="PROGRAMLISTING" 357><A 358HREF="libxml-uri.html#XMLURIPTR" 359>xmlURIPtr</A 360> xmlCreateURI (void);</PRE 361></TD 362></TR 363></TABLE 364><P 365>Simply creates an empty xmlURI</P 366><P 367></P 368><DIV 369CLASS="INFORMALTABLE" 370><A 371NAME="AEN10720"><P 372></P 373><TABLE 374BORDER="0" 375WIDTH="100%" 376BGCOLOR="#FFD0D0" 377CELLSPACING="0" 378CELLPADDING="4" 379CLASS="CALSTABLE" 380><TBODY 381><TR 382><TD 383WIDTH="20%" 384ALIGN="RIGHT" 385VALIGN="TOP" 386><SPAN 387CLASS="emphasis" 388><I 389CLASS="EMPHASIS" 390>Returns</I 391></SPAN 392> :</TD 393><TD 394WIDTH="80%" 395ALIGN="LEFT" 396VALIGN="TOP" 397>the new structure or NULL in case of error</TD 398></TR 399></TBODY 400></TABLE 401><P 402></P 403></DIV 404></DIV 405><HR><DIV 406CLASS="REFSECT2" 407><A 408NAME="AEN10729" 409></A 410><H3 411><A 412NAME="XMLBUILDURI" 413></A 414>xmlBuildURI ()</H3 415><TABLE 416BORDER="0" 417BGCOLOR="#D6E8FF" 418WIDTH="100%" 419CELLPADDING="6" 420><TR 421><TD 422><PRE 423CLASS="PROGRAMLISTING" 424><A 425HREF="libxml-tree.html#XMLCHAR" 426>xmlChar</A 427>* xmlBuildURI (const <A 428HREF="libxml-tree.html#XMLCHAR" 429>xmlChar</A 430> *URI, 431 const <A 432HREF="libxml-tree.html#XMLCHAR" 433>xmlChar</A 434> *base);</PRE 435></TD 436></TR 437></TABLE 438><P 439>Computes he final URI of the reference done by checking that 440the given URI is valid, and building the final URI using the 441base URI. This is processed according to section 5.2 of the 442RFC 2396</P 443><P 444>5.2. Resolving Relative References to Absolute Form</P 445><P 446></P 447><DIV 448CLASS="INFORMALTABLE" 449><A 450NAME="AEN10739"><P 451></P 452><TABLE 453BORDER="0" 454WIDTH="100%" 455BGCOLOR="#FFD0D0" 456CELLSPACING="0" 457CELLPADDING="4" 458CLASS="CALSTABLE" 459><TBODY 460><TR 461><TD 462WIDTH="20%" 463ALIGN="RIGHT" 464VALIGN="TOP" 465><TT 466CLASS="PARAMETER" 467><I 468>URI</I 469></TT 470> :</TD 471><TD 472WIDTH="80%" 473ALIGN="LEFT" 474VALIGN="TOP" 475> the URI instance found in the document</TD 476></TR 477><TR 478><TD 479WIDTH="20%" 480ALIGN="RIGHT" 481VALIGN="TOP" 482><TT 483CLASS="PARAMETER" 484><I 485>base</I 486></TT 487> :</TD 488><TD 489WIDTH="80%" 490ALIGN="LEFT" 491VALIGN="TOP" 492> the base value</TD 493></TR 494><TR 495><TD 496WIDTH="20%" 497ALIGN="RIGHT" 498VALIGN="TOP" 499><SPAN 500CLASS="emphasis" 501><I 502CLASS="EMPHASIS" 503>Returns</I 504></SPAN 505> :</TD 506><TD 507WIDTH="80%" 508ALIGN="LEFT" 509VALIGN="TOP" 510>a new URI string (to be freed by the caller) or NULL in case 511of error.</TD 512></TR 513></TBODY 514></TABLE 515><P 516></P 517></DIV 518></DIV 519><HR><DIV 520CLASS="REFSECT2" 521><A 522NAME="AEN10756" 523></A 524><H3 525><A 526NAME="XMLPARSEURI" 527></A 528>xmlParseURI ()</H3 529><TABLE 530BORDER="0" 531BGCOLOR="#D6E8FF" 532WIDTH="100%" 533CELLPADDING="6" 534><TR 535><TD 536><PRE 537CLASS="PROGRAMLISTING" 538><A 539HREF="libxml-uri.html#XMLURIPTR" 540>xmlURIPtr</A 541> xmlParseURI (const char *str);</PRE 542></TD 543></TR 544></TABLE 545><P 546>Parse an URI </P 547><P 548>URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]</P 549><P 550></P 551><DIV 552CLASS="INFORMALTABLE" 553><A 554NAME="AEN10764"><P 555></P 556><TABLE 557BORDER="0" 558WIDTH="100%" 559BGCOLOR="#FFD0D0" 560CELLSPACING="0" 561CELLPADDING="4" 562CLASS="CALSTABLE" 563><TBODY 564><TR 565><TD 566WIDTH="20%" 567ALIGN="RIGHT" 568VALIGN="TOP" 569><TT 570CLASS="PARAMETER" 571><I 572>str</I 573></TT 574> :</TD 575><TD 576WIDTH="80%" 577ALIGN="LEFT" 578VALIGN="TOP" 579> the URI string to analyze</TD 580></TR 581><TR 582><TD 583WIDTH="20%" 584ALIGN="RIGHT" 585VALIGN="TOP" 586><SPAN 587CLASS="emphasis" 588><I 589CLASS="EMPHASIS" 590>Returns</I 591></SPAN 592> :</TD 593><TD 594WIDTH="80%" 595ALIGN="LEFT" 596VALIGN="TOP" 597>a newly build xmlURIPtr or NULL in case of error</TD 598></TR 599></TBODY 600></TABLE 601><P 602></P 603></DIV 604></DIV 605><HR><DIV 606CLASS="REFSECT2" 607><A 608NAME="AEN10777" 609></A 610><H3 611><A 612NAME="XMLPARSEURIREFERENCE" 613></A 614>xmlParseURIReference ()</H3 615><TABLE 616BORDER="0" 617BGCOLOR="#D6E8FF" 618WIDTH="100%" 619CELLPADDING="6" 620><TR 621><TD 622><PRE 623CLASS="PROGRAMLISTING" 624>int xmlParseURIReference (<A 625HREF="libxml-uri.html#XMLURIPTR" 626>xmlURIPtr</A 627> uri, 628 const char *str);</PRE 629></TD 630></TR 631></TABLE 632><P 633>Parse an URI reference string and fills in the appropriate fields 634of the <TT 635CLASS="PARAMETER" 636><I 637>uri</I 638></TT 639> structure</P 640><P 641>URI-reference = [ absoluteURI | relativeURI ] [ "#" fragment ]</P 642><P 643></P 644><DIV 645CLASS="INFORMALTABLE" 646><A 647NAME="AEN10786"><P 648></P 649><TABLE 650BORDER="0" 651WIDTH="100%" 652BGCOLOR="#FFD0D0" 653CELLSPACING="0" 654CELLPADDING="4" 655CLASS="CALSTABLE" 656><TBODY 657><TR 658><TD 659WIDTH="20%" 660ALIGN="RIGHT" 661VALIGN="TOP" 662><TT 663CLASS="PARAMETER" 664><I 665>uri</I 666></TT 667> :</TD 668><TD 669WIDTH="80%" 670ALIGN="LEFT" 671VALIGN="TOP" 672> pointer to an URI structure</TD 673></TR 674><TR 675><TD 676WIDTH="20%" 677ALIGN="RIGHT" 678VALIGN="TOP" 679><TT 680CLASS="PARAMETER" 681><I 682>str</I 683></TT 684> :</TD 685><TD 686WIDTH="80%" 687ALIGN="LEFT" 688VALIGN="TOP" 689> the string to analyze</TD 690></TR 691><TR 692><TD 693WIDTH="20%" 694ALIGN="RIGHT" 695VALIGN="TOP" 696><SPAN 697CLASS="emphasis" 698><I 699CLASS="EMPHASIS" 700>Returns</I 701></SPAN 702> :</TD 703><TD 704WIDTH="80%" 705ALIGN="LEFT" 706VALIGN="TOP" 707>0 or the error code</TD 708></TR 709></TBODY 710></TABLE 711><P 712></P 713></DIV 714></DIV 715><HR><DIV 716CLASS="REFSECT2" 717><A 718NAME="AEN10803" 719></A 720><H3 721><A 722NAME="XMLSAVEURI" 723></A 724>xmlSaveUri ()</H3 725><TABLE 726BORDER="0" 727BGCOLOR="#D6E8FF" 728WIDTH="100%" 729CELLPADDING="6" 730><TR 731><TD 732><PRE 733CLASS="PROGRAMLISTING" 734><A 735HREF="libxml-tree.html#XMLCHAR" 736>xmlChar</A 737>* xmlSaveUri (<A 738HREF="libxml-uri.html#XMLURIPTR" 739>xmlURIPtr</A 740> uri);</PRE 741></TD 742></TR 743></TABLE 744><P 745>Save the URI as an escaped string</P 746><P 747></P 748><DIV 749CLASS="INFORMALTABLE" 750><A 751NAME="AEN10811"><P 752></P 753><TABLE 754BORDER="0" 755WIDTH="100%" 756BGCOLOR="#FFD0D0" 757CELLSPACING="0" 758CELLPADDING="4" 759CLASS="CALSTABLE" 760><TBODY 761><TR 762><TD 763WIDTH="20%" 764ALIGN="RIGHT" 765VALIGN="TOP" 766><TT 767CLASS="PARAMETER" 768><I 769>uri</I 770></TT 771> :</TD 772><TD 773WIDTH="80%" 774ALIGN="LEFT" 775VALIGN="TOP" 776> pointer to an xmlURI</TD 777></TR 778><TR 779><TD 780WIDTH="20%" 781ALIGN="RIGHT" 782VALIGN="TOP" 783><SPAN 784CLASS="emphasis" 785><I 786CLASS="EMPHASIS" 787>Returns</I 788></SPAN 789> :</TD 790><TD 791WIDTH="80%" 792ALIGN="LEFT" 793VALIGN="TOP" 794>a new string (to be deallocated by caller)</TD 795></TR 796></TBODY 797></TABLE 798><P 799></P 800></DIV 801></DIV 802><HR><DIV 803CLASS="REFSECT2" 804><A 805NAME="AEN10824" 806></A 807><H3 808><A 809NAME="XMLPRINTURI" 810></A 811>xmlPrintURI ()</H3 812><TABLE 813BORDER="0" 814BGCOLOR="#D6E8FF" 815WIDTH="100%" 816CELLPADDING="6" 817><TR 818><TD 819><PRE 820CLASS="PROGRAMLISTING" 821>void xmlPrintURI (<GTKDOCLINK 822HREF="FILE-CAPS" 823>FILE</GTKDOCLINK 824> *stream, 825 <A 826HREF="libxml-uri.html#XMLURIPTR" 827>xmlURIPtr</A 828> uri);</PRE 829></TD 830></TR 831></TABLE 832><P 833>Prints the URI in the stream <TT 834CLASS="PARAMETER" 835><I 836>steam</I 837></TT 838>.</P 839><P 840></P 841><DIV 842CLASS="INFORMALTABLE" 843><A 844NAME="AEN10833"><P 845></P 846><TABLE 847BORDER="0" 848WIDTH="100%" 849BGCOLOR="#FFD0D0" 850CELLSPACING="0" 851CELLPADDING="4" 852CLASS="CALSTABLE" 853><TBODY 854><TR 855><TD 856WIDTH="20%" 857ALIGN="RIGHT" 858VALIGN="TOP" 859><TT 860CLASS="PARAMETER" 861><I 862>stream</I 863></TT 864> :</TD 865><TD 866WIDTH="80%" 867ALIGN="LEFT" 868VALIGN="TOP" 869> a FILE* for the output</TD 870></TR 871><TR 872><TD 873WIDTH="20%" 874ALIGN="RIGHT" 875VALIGN="TOP" 876><TT 877CLASS="PARAMETER" 878><I 879>uri</I 880></TT 881> :</TD 882><TD 883WIDTH="80%" 884ALIGN="LEFT" 885VALIGN="TOP" 886> pointer to an xmlURI</TD 887></TR 888></TBODY 889></TABLE 890><P 891></P 892></DIV 893></DIV 894><HR><DIV 895CLASS="REFSECT2" 896><A 897NAME="AEN10846" 898></A 899><H3 900><A 901NAME="XMLURIESCAPESTR" 902></A 903>xmlURIEscapeStr ()</H3 904><TABLE 905BORDER="0" 906BGCOLOR="#D6E8FF" 907WIDTH="100%" 908CELLPADDING="6" 909><TR 910><TD 911><PRE 912CLASS="PROGRAMLISTING" 913><A 914HREF="libxml-tree.html#XMLCHAR" 915>xmlChar</A 916>* xmlURIEscapeStr (const <A 917HREF="libxml-tree.html#XMLCHAR" 918>xmlChar</A 919> *str, 920 const <A 921HREF="libxml-tree.html#XMLCHAR" 922>xmlChar</A 923> *list);</PRE 924></TD 925></TR 926></TABLE 927><P 928>This routine escapes a string to hex, ignoring reserved characters (a-z) 929and the characters in the exception list.</P 930><P 931></P 932><DIV 933CLASS="INFORMALTABLE" 934><A 935NAME="AEN10855"><P 936></P 937><TABLE 938BORDER="0" 939WIDTH="100%" 940BGCOLOR="#FFD0D0" 941CELLSPACING="0" 942CELLPADDING="4" 943CLASS="CALSTABLE" 944><TBODY 945><TR 946><TD 947WIDTH="20%" 948ALIGN="RIGHT" 949VALIGN="TOP" 950><TT 951CLASS="PARAMETER" 952><I 953>str</I 954></TT 955> :</TD 956><TD 957WIDTH="80%" 958ALIGN="LEFT" 959VALIGN="TOP" 960> string to escape</TD 961></TR 962><TR 963><TD 964WIDTH="20%" 965ALIGN="RIGHT" 966VALIGN="TOP" 967><TT 968CLASS="PARAMETER" 969><I 970>list</I 971></TT 972> :</TD 973><TD 974WIDTH="80%" 975ALIGN="LEFT" 976VALIGN="TOP" 977> exception list string of chars not to escape</TD 978></TR 979><TR 980><TD 981WIDTH="20%" 982ALIGN="RIGHT" 983VALIGN="TOP" 984><SPAN 985CLASS="emphasis" 986><I 987CLASS="EMPHASIS" 988>Returns</I 989></SPAN 990> :</TD 991><TD 992WIDTH="80%" 993ALIGN="LEFT" 994VALIGN="TOP" 995>a new escaped string or NULL in case of error.</TD 996></TR 997></TBODY 998></TABLE 999><P 1000></P 1001></DIV 1002></DIV 1003><HR><DIV 1004CLASS="REFSECT2" 1005><A 1006NAME="AEN10872" 1007></A 1008><H3 1009><A 1010NAME="XMLURIUNESCAPESTRING" 1011></A 1012>xmlURIUnescapeString ()</H3 1013><TABLE 1014BORDER="0" 1015BGCOLOR="#D6E8FF" 1016WIDTH="100%" 1017CELLPADDING="6" 1018><TR 1019><TD 1020><PRE 1021CLASS="PROGRAMLISTING" 1022>char* xmlURIUnescapeString (const char *str, 1023 int len, 1024 char *target);</PRE 1025></TD 1026></TR 1027></TABLE 1028><P 1029>Unescaping routine, does not do validity checks ! 1030Output is direct unsigned char translation of <TT 1031CLASS="LITERAL" 1032>XX</TT 1033> values (no encoding)</P 1034><P 1035></P 1036><DIV 1037CLASS="INFORMALTABLE" 1038><A 1039NAME="AEN10879"><P 1040></P 1041><TABLE 1042BORDER="0" 1043WIDTH="100%" 1044BGCOLOR="#FFD0D0" 1045CELLSPACING="0" 1046CELLPADDING="4" 1047CLASS="CALSTABLE" 1048><TBODY 1049><TR 1050><TD 1051WIDTH="20%" 1052ALIGN="RIGHT" 1053VALIGN="TOP" 1054><TT 1055CLASS="PARAMETER" 1056><I 1057>str</I 1058></TT 1059> :</TD 1060><TD 1061WIDTH="80%" 1062ALIGN="LEFT" 1063VALIGN="TOP" 1064> the string to unescape</TD 1065></TR 1066><TR 1067><TD 1068WIDTH="20%" 1069ALIGN="RIGHT" 1070VALIGN="TOP" 1071><TT 1072CLASS="PARAMETER" 1073><I 1074>len</I 1075></TT 1076> :</TD 1077><TD 1078WIDTH="80%" 1079ALIGN="LEFT" 1080VALIGN="TOP" 1081> the length in bytes to unescape (or <= 0 to indicate full string)</TD 1082></TR 1083><TR 1084><TD 1085WIDTH="20%" 1086ALIGN="RIGHT" 1087VALIGN="TOP" 1088><TT 1089CLASS="PARAMETER" 1090><I 1091>target</I 1092></TT 1093> :</TD 1094><TD 1095WIDTH="80%" 1096ALIGN="LEFT" 1097VALIGN="TOP" 1098> optional destination buffer</TD 1099></TR 1100><TR 1101><TD 1102WIDTH="20%" 1103ALIGN="RIGHT" 1104VALIGN="TOP" 1105><SPAN 1106CLASS="emphasis" 1107><I 1108CLASS="EMPHASIS" 1109>Returns</I 1110></SPAN 1111> :</TD 1112><TD 1113WIDTH="80%" 1114ALIGN="LEFT" 1115VALIGN="TOP" 1116>an copy of the string, but unescaped</TD 1117></TR 1118></TBODY 1119></TABLE 1120><P 1121></P 1122></DIV 1123></DIV 1124><HR><DIV 1125CLASS="REFSECT2" 1126><A 1127NAME="AEN10900" 1128></A 1129><H3 1130><A 1131NAME="XMLNORMALIZEURIPATH" 1132></A 1133>xmlNormalizeURIPath ()</H3 1134><TABLE 1135BORDER="0" 1136BGCOLOR="#D6E8FF" 1137WIDTH="100%" 1138CELLPADDING="6" 1139><TR 1140><TD 1141><PRE 1142CLASS="PROGRAMLISTING" 1143>int xmlNormalizeURIPath (char *path);</PRE 1144></TD 1145></TR 1146></TABLE 1147><P 1148>Applies the 5 normalization steps to a path string--that is, RFC 2396 1149Section 5.2, steps 6.c through 6.g.</P 1150><P 1151>Normalization occurs directly on the string, no new allocation is done</P 1152><P 1153></P 1154><DIV 1155CLASS="INFORMALTABLE" 1156><A 1157NAME="AEN10907"><P 1158></P 1159><TABLE 1160BORDER="0" 1161WIDTH="100%" 1162BGCOLOR="#FFD0D0" 1163CELLSPACING="0" 1164CELLPADDING="4" 1165CLASS="CALSTABLE" 1166><TBODY 1167><TR 1168><TD 1169WIDTH="20%" 1170ALIGN="RIGHT" 1171VALIGN="TOP" 1172><TT 1173CLASS="PARAMETER" 1174><I 1175>path</I 1176></TT 1177> :</TD 1178><TD 1179WIDTH="80%" 1180ALIGN="LEFT" 1181VALIGN="TOP" 1182> pointer to the path string</TD 1183></TR 1184><TR 1185><TD 1186WIDTH="20%" 1187ALIGN="RIGHT" 1188VALIGN="TOP" 1189><SPAN 1190CLASS="emphasis" 1191><I 1192CLASS="EMPHASIS" 1193>Returns</I 1194></SPAN 1195> :</TD 1196><TD 1197WIDTH="80%" 1198ALIGN="LEFT" 1199VALIGN="TOP" 1200>0 or an error code</TD 1201></TR 1202></TBODY 1203></TABLE 1204><P 1205></P 1206></DIV 1207></DIV 1208><HR><DIV 1209CLASS="REFSECT2" 1210><A 1211NAME="AEN10920" 1212></A 1213><H3 1214><A 1215NAME="XMLURIESCAPE" 1216></A 1217>xmlURIEscape ()</H3 1218><TABLE 1219BORDER="0" 1220BGCOLOR="#D6E8FF" 1221WIDTH="100%" 1222CELLPADDING="6" 1223><TR 1224><TD 1225><PRE 1226CLASS="PROGRAMLISTING" 1227><A 1228HREF="libxml-tree.html#XMLCHAR" 1229>xmlChar</A 1230>* xmlURIEscape (const <A 1231HREF="libxml-tree.html#XMLCHAR" 1232>xmlChar</A 1233> *str);</PRE 1234></TD 1235></TR 1236></TABLE 1237><P 1238>Escaping routine, does not do validity checks ! 1239It will try to escape the chars needing this, but this is heuristic 1240based it's impossible to be sure.</P 1241><P 1242></P 1243><DIV 1244CLASS="INFORMALTABLE" 1245><A 1246NAME="AEN10928"><P 1247></P 1248><TABLE 1249BORDER="0" 1250WIDTH="100%" 1251BGCOLOR="#FFD0D0" 1252CELLSPACING="0" 1253CELLPADDING="4" 1254CLASS="CALSTABLE" 1255><TBODY 1256><TR 1257><TD 1258WIDTH="20%" 1259ALIGN="RIGHT" 1260VALIGN="TOP" 1261><TT 1262CLASS="PARAMETER" 1263><I 1264>str</I 1265></TT 1266> :</TD 1267><TD 1268WIDTH="80%" 1269ALIGN="LEFT" 1270VALIGN="TOP" 1271> the string of the URI to escape</TD 1272></TR 1273><TR 1274><TD 1275WIDTH="20%" 1276ALIGN="RIGHT" 1277VALIGN="TOP" 1278><SPAN 1279CLASS="emphasis" 1280><I 1281CLASS="EMPHASIS" 1282>Returns</I 1283></SPAN 1284> :</TD 1285><TD 1286WIDTH="80%" 1287ALIGN="LEFT" 1288VALIGN="TOP" 1289>an copy of the string, but escaped 1290 129125 May 2001 1292Uses xmlParseURI and xmlURIEscapeStr to try to escape correctly 1293according to RFC2396. 1294- Carl Douglas</TD 1295></TR 1296></TBODY 1297></TABLE 1298><P 1299></P 1300></DIV 1301></DIV 1302><HR><DIV 1303CLASS="REFSECT2" 1304><A 1305NAME="AEN10941" 1306></A 1307><H3 1308><A 1309NAME="XMLFREEURI" 1310></A 1311>xmlFreeURI ()</H3 1312><TABLE 1313BORDER="0" 1314BGCOLOR="#D6E8FF" 1315WIDTH="100%" 1316CELLPADDING="6" 1317><TR 1318><TD 1319><PRE 1320CLASS="PROGRAMLISTING" 1321>void xmlFreeURI (<A 1322HREF="libxml-uri.html#XMLURIPTR" 1323>xmlURIPtr</A 1324> uri);</PRE 1325></TD 1326></TR 1327></TABLE 1328><P 1329>Free up the xmlURI struct</P 1330><P 1331></P 1332><DIV 1333CLASS="INFORMALTABLE" 1334><A 1335NAME="AEN10948"><P 1336></P 1337><TABLE 1338BORDER="0" 1339WIDTH="100%" 1340BGCOLOR="#FFD0D0" 1341CELLSPACING="0" 1342CELLPADDING="4" 1343CLASS="CALSTABLE" 1344><TBODY 1345><TR 1346><TD 1347WIDTH="20%" 1348ALIGN="RIGHT" 1349VALIGN="TOP" 1350><TT 1351CLASS="PARAMETER" 1352><I 1353>uri</I 1354></TT 1355> :</TD 1356><TD 1357WIDTH="80%" 1358ALIGN="LEFT" 1359VALIGN="TOP" 1360> pointer to an xmlURI</TD 1361></TR 1362></TBODY 1363></TABLE 1364><P 1365></P 1366></DIV 1367></DIV 1368></DIV 1369><DIV 1370CLASS="NAVFOOTER" 1371><BR 1372CLEAR="all"><BR><TABLE 1373WIDTH="100%" 1374BORDER="0" 1375BGCOLOR="#000000" 1376CELLPADDING="1" 1377CELLSPACING="0" 1378><TR 1379><TD 1380WIDTH="25%" 1381BGCOLOR="#C00000" 1382ALIGN="left" 1383><A 1384HREF="libxml-valid.html" 1385><FONT 1386COLOR="#FFFFFF" 1387SIZE="3" 1388><B 1389><<< Previous Page</B 1390></FONT 1391></A 1392></TD 1393><TD 1394WIDTH="25%" 1395BGCOLOR="#0000C0" 1396ALIGN="center" 1397><FONT 1398COLOR="#FFFFFF" 1399SIZE="3" 1400><B 1401><A 1402HREF="book1.html" 1403><FONT 1404COLOR="#FFFFFF" 1405SIZE="3" 1406><B 1407>Home</B 1408></FONT 1409></A 1410></B 1411></FONT 1412></TD 1413><TD 1414WIDTH="25%" 1415BGCOLOR="#00C000" 1416ALIGN="center" 1417><FONT 1418COLOR="#FFFFFF" 1419SIZE="3" 1420><B 1421><A 1422HREF="libxml-lib.html" 1423><FONT 1424COLOR="#FFFFFF" 1425SIZE="3" 1426><B 1427>Up</B 1428></FONT 1429></A 1430></B 1431></FONT 1432></TD 1433><TD 1434WIDTH="25%" 1435BGCOLOR="#C00000" 1436ALIGN="right" 1437><A 1438HREF="libxml-xmlerror.html" 1439><FONT 1440COLOR="#FFFFFF" 1441SIZE="3" 1442><B 1443>Next Page >>></B 1444></FONT 1445></A 1446></TD 1447></TR 1448><TR 1449><TD 1450COLSPAN="2" 1451ALIGN="left" 1452><FONT 1453COLOR="#FFFFFF" 1454SIZE="3" 1455><B 1456>valid</B 1457></FONT 1458></TD 1459><TD 1460COLSPAN="2" 1461ALIGN="right" 1462><FONT 1463COLOR="#FFFFFF" 1464SIZE="3" 1465><B 1466>xmlerror</B 1467></FONT 1468></TD 1469></TR 1470></TABLE 1471></DIV 1472></BODY 1473></HTML 1474>