This file is indexed.

/usr/include/upnp/ixml.h is in libupnp3-dev 1:1.6.6-5.1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   1
   2
   3
   4
   5
   6
   7
   8
   9
  10
  11
  12
  13
  14
  15
  16
  17
  18
  19
  20
  21
  22
  23
  24
  25
  26
  27
  28
  29
  30
  31
  32
  33
  34
  35
  36
  37
  38
  39
  40
  41
  42
  43
  44
  45
  46
  47
  48
  49
  50
  51
  52
  53
  54
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
/*******************************************************************************
 *
 * Copyright (c) 2000-2003 Intel Corporation 
 * All rights reserved. 
 *
 * Redistribution and use in source and binary forms, with or without 
 * modification, are permitted provided that the following conditions are met: 
 *
 * * Redistributions of source code must retain the above copyright notice, 
 * this list of conditions and the following disclaimer. 
 * * Redistributions in binary form must reproduce the above copyright notice, 
 * this list of conditions and the following disclaimer in the documentation 
 * and/or other materials provided with the distribution. 
 * * Neither name of Intel Corporation nor the names of its contributors 
 * may be used to endorse or promote products derived from this software 
 * without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR 
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 ******************************************************************************/

#ifndef _IXML_H_
#define _IXML_H_


#include <stdio.h>
#include <string.h>
#include <assert.h>


#ifdef WIN32
	#ifndef UPNP_STATIC_LIB
		#ifdef LIBUPNP_EXPORTS
			/* set up declspec for dll export to make functions visible to library users */
			#define EXPORT_SPEC __declspec(dllexport)
		#else
			#define EXPORT_SPEC __declspec(dllimport)
		#endif
	#else
		#define EXPORT_SPEC
	#endif
#else
	#define EXPORT_SPEC
#endif

typedef int BOOL;


#define DOMString   char *


#ifndef TRUE
#define TRUE 1
#endif

#ifndef FALSE
#define FALSE 0
#endif

#ifndef IN
#define IN
#endif

#ifndef OUT
#define OUT
#endif

#ifndef INOUT
#define INOUT
#endif

/**@name DOM Interfaces 
 * The Document Object Model consists of a set of objects and interfaces
 * for accessing and manipulating documents.  IXML does not implement all
 * the interfaces documented in the DOM2-Core recommendation but defines
 * a subset of the most useful interfaces.  A description of the supported
 * interfaces and methods is presented in this section.
 *
 * For a complete discussion on the object model, the object hierarchy,
 * etc., refer to section 1.1 of the DOM2-Core recommendation.
 */

/*! @{ */

/*================================================================
*
*   DOM node type 
*
*
*=================================================================*/
typedef enum
{
    eINVALID_NODE                   = 0,
    eELEMENT_NODE                   = 1,
    eATTRIBUTE_NODE                 = 2,
    eTEXT_NODE                      = 3,
    eCDATA_SECTION_NODE             = 4,
    eENTITY_REFERENCE_NODE          = 5,
    eENTITY_NODE                    = 6,                
    ePROCESSING_INSTRUCTION_NODE    = 7,
    eCOMMENT_NODE                   = 8,
    eDOCUMENT_NODE                  = 9,
    eDOCUMENT_TYPE_NODE             = 10,
    eDOCUMENT_FRAGMENT_NODE         = 11,
    eNOTATION_NODE                  = 12,

}   IXML_NODE_TYPE;

/*================================================================
*
*   error code 
*
*
*=================================================================*/
typedef enum 
{   /* see DOM spec */
    IXML_INDEX_SIZE_ERR                 = 1,
    IXML_DOMSTRING_SIZE_ERR             = 2,
    IXML_HIERARCHY_REQUEST_ERR          = 3,
    IXML_WRONG_DOCUMENT_ERR             = 4,
    IXML_INVALID_CHARACTER_ERR          = 5,
    IXML_NO_DATA_ALLOWED_ERR            = 6,
    IXML_NO_MODIFICATION_ALLOWED_ERR    = 7,
    IXML_NOT_FOUND_ERR                  = 8,
    IXML_NOT_SUPPORTED_ERR              = 9,
    IXML_INUSE_ATTRIBUTE_ERR            = 10,
    IXML_INVALID_STATE_ERR              = 11,
    IXML_SYNTAX_ERR                     = 12,
    IXML_INVALID_MODIFICATION_ERR       = 13,
    IXML_NAMESPACE_ERR                  = 14,
    IXML_INVALID_ACCESS_ERR             = 15,

    IXML_SUCCESS                        = 0,
    IXML_NO_SUCH_FILE                   = 101,
    IXML_INSUFFICIENT_MEMORY            = 102,
    IXML_FILE_DONE                      = 104,
    IXML_INVALID_PARAMETER              = 105,
    IXML_FAILED                         = 106,
    IXML_INVALID_ITEM_NUMBER            = 107,

} IXML_ERRORCODE;


#define DOCUMENTNODENAME    "#document"
#define TEXTNODENAME        "#text"
#define CDATANODENAME       "#cdata-section"

/*================================================================
*
*   DOM data structures
*
*
*=================================================================*/
typedef struct _IXML_Document *Docptr;

typedef struct _IXML_Node    *Nodeptr;
typedef struct _IXML_Node
{
    DOMString       nodeName;
    DOMString       nodeValue;
    IXML_NODE_TYPE  nodeType;
    DOMString       namespaceURI;
    DOMString       prefix;
    DOMString       localName;
    BOOL            readOnly;

    Nodeptr         parentNode;
    Nodeptr         firstChild;
    Nodeptr         prevSibling;
    Nodeptr         nextSibling;
    Nodeptr         firstAttr;
    Docptr          ownerDocument;

} IXML_Node;

typedef struct _IXML_Document
{
    IXML_Node    n;
} IXML_Document;

typedef struct _IXML_CDATASection
{
    IXML_Node    n;
} IXML_CDATASection;

typedef struct _IXML_Element
{
    IXML_Node   n;
    DOMString   tagName;

} IXML_Element;

typedef struct _IXML_ATTR
{
    IXML_Node   n;
    BOOL        specified;
    IXML_Element *ownerElement;
} IXML_Attr;

typedef struct _IXML_Text
{
    IXML_Node   n;
} IXML_Text;

typedef struct _IXML_NodeList
{
    IXML_Node    *nodeItem;
    struct  _IXML_NodeList *next;
} IXML_NodeList;


typedef struct _IXML_NamedNodeMap
{
    IXML_Node                 *nodeItem;
    struct _IXML_NamedNodeMap *next;
} IXML_NamedNodeMap;

#ifdef __cplusplus
extern "C" {
#endif

/*================================================================
*
*   NODE interfaces
*
*
*=================================================================*/

/**@name Interface {\it Node}
 * The {\bf Node} interface forms the primary datatype for all other DOM 
 * objects.  Every other interface is derived from this interface, inheriting 
 * its functionality.  For more information, refer to DOM2-Core page 34.
 */

/*! @{ */

  /** Returns the name of the {\bf Node}, depending on what type of 
   *  {\bf Node} it is, in a read-only string. Refer to the table in the 
   *  DOM2-Core for a description of the node names for various interfaces.
   *
   *  @return [const DOMString] A constant {\bf DOMString} of the node name.
   */

EXPORT_SPEC const DOMString
ixmlNode_getNodeName(IXML_Node *nodeptr 
		       /** Pointer to the node to retrieve the name. */
                    );

  /** Returns the value of the {\bf Node} as a string.  Note that this string 
   *  is not a copy and modifying it will modify the value of the {\bf Node}.
   *
   *  @return [DOMString] A {\bf DOMString} of the {\bf Node} value.
   */

EXPORT_SPEC const DOMString               
ixmlNode_getNodeValue(IXML_Node *nodeptr  
		        /** Pointer to the {\bf Node} to retrieve the value. */
                     );

  /** Assigns a new value to a {\bf Node}.  The {\bf newNodeValue} string is
   *  duplicated and stored in the {\bf Node} so that the original does not
   *  have to persist past this call.
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: The {\bf Node*} is not a valid 
   *            pointer.
   *      \item {\tt IXML_INSUFFICIENT_MEMORY}: Not enough free memory exists 
   *            to complete this operation.
   *    \end{itemize}
   */

EXPORT_SPEC int                     
ixmlNode_setNodeValue(IXML_Node *nodeptr, 
		        /** The {\bf Node} to which to assign a new value. */
                      const char *newNodeValue  
		        /** The new value of the {\bf Node}. */
                  );

  /** Retrieves the type of a {\bf Node}.  The defined {\bf Node} constants 
   *  are:
   *  \begin{itemize}
   *    \item {\tt eATTRIBUTE_NODE} 
   *    \item {\tt eCDATA_SECTION_NODE}
   *    \item {\tt eCOMMENT_NODE}
   *    \item {\tt eDOCUMENT_FRAGMENT_NODE} 
   *    \item {\tt eDOCUMENT_NODE} 
   *    \item {\tt eDOCUMENT_TYPE_NODE} 
   *    \item {\tt eELEMENT_NODE} 
   *    \item {\tt eENTITY_NODE}
   *    \item {\tt eENTITY_REFERENCE_NODE}
   *    \item {\tt eNOTATION_NODE} 
   *    \item {\tt ePROCESSING_INSTRUCTION_NODE}
   *    \item {\tt eTEXT_NODE}
   *  \end{itemize}
   *
   *  @return [const unsigned short] An integer representing the type of the 
   *          {\bf Node}.
   */

EXPORT_SPEC unsigned short    
ixmlNode_getNodeType(IXML_Node *nodeptr  
		       /** The {\bf Node} from which to retrieve the type. */
                    );

  /** Retrieves the parent {\bf Node} for a {\bf Node}.
   *
   *  @return [Node*] A pointer to the parent {\bf Node} or {\tt NULL} if the 
   *          {\bf Node} has no parent.
   */

EXPORT_SPEC IXML_Node*                   
ixmlNode_getParentNode(IXML_Node *nodeptr  
		         /** The {\bf Node} from which to retrieve the 
			     parent. */ 
                      );

  /** Retrieves the list of children of a {\bf Node} in a {\bf NodeList} 
   *  structure.  If a {\bf Node} has no children, {\bf ixmlNode_getChildNodes} 
   *  returns a {\bf NodeList} structure that contains no {\bf Node}s.
   *
   *  @return [NodeList*] A {\bf NodeList} of the children of the {\bf Node}.
   */

EXPORT_SPEC IXML_NodeList*               
ixmlNode_getChildNodes(IXML_Node *nodeptr  
		         /** The {\bf Node} from which to retrieve the 
			     children. */
                   );

  /** Retrieves the first child {\bf Node} of a {\bf Node}.
   *
   *  @return [Node*] A pointer to the first child {\bf Node} or {\tt NULL} 
   *                  if the {\bf Node} does not have any children.
   */

EXPORT_SPEC IXML_Node*                   
ixmlNode_getFirstChild(IXML_Node *nodeptr  
		         /** The {\bf Node} from which to retrieve the first 
			     child.  */ 
);

  /** Retrieves the last child {\bf Node} of a {\bf Node}.
   *
   *  @return [Node*] A pointer to the last child {\bf Node} or {\tt NULL} if 
   *                  the {\bf Node} does not have any children.
   */

EXPORT_SPEC IXML_Node*                   
ixmlNode_getLastChild(IXML_Node *nodeptr  
		        /** The {\bf Node} from which to retrieve the last 
			    child. */
                  );

  /** Retrieves the sibling {\bf Node} immediately preceding this {\bf Node}.
   *
   *  @return [Node*] A pointer to the previous sibling {\bf Node} or 
   *                  {\tt NULL} if no such {\bf Node} exists.
   */

EXPORT_SPEC IXML_Node*                   
ixmlNode_getPreviousSibling(IXML_Node *nodeptr  
		              /** The {\bf Node} for which to retrieve the 
			          previous sibling.  */
                        );

  /** Retrieves the sibling {\bf Node} immediately following this {\bf Node}.
   *
   *  @return [Node*] A pointer to the next sibling {\bf Node} or {\tt NULL} 
   *                  if no such {\bf Node} exists.
   */

EXPORT_SPEC IXML_Node*                   
ixmlNode_getNextSibling(IXML_Node *nodeptr  
		          /** The {\bf Node} from which to retrieve the next 
			      sibling. */ 
                    );

  /** Retrieves the attributes of a {\bf Node}, if it is an {\bf Element} node,
   *  in a {\bf NamedNodeMap} structure.
   *
   *  @return [NamedNodeMap*] A {\bf NamedNodeMap} of the attributes or 
   *                          {\tt NULL}.
   */

EXPORT_SPEC IXML_NamedNodeMap*           
ixmlNode_getAttributes(IXML_Node *nodeptr  
		         /** The {\bf Node} from which to retrieve the 
			     attributes. */ 
                   );

  /** Retrieves the document object associated with this {\bf Node}.  This 
   *  owner document {\bf Node} allows other {\bf Node}s to be created in the 
   *  context of this document.  Note that {\bf Document} nodes do not have 
   *  an owner document.
   *
   *  @return [Document*] A pointer to the owning {\bf Document} or 
   *                      {\tt NULL}, if the {\bf Node} does not have an owner.
   */

EXPORT_SPEC IXML_Document*               
ixmlNode_getOwnerDocument(IXML_Node *nodeptr  
		            /** The {\bf Node} from which to retrieve the 
			        owner document. */
                      );

  /** Retrieves the namespace URI for a {\bf Node} as a {\bf DOMString}.  Only
   *  {\bf Node}s of type {\tt eELEMENT_NODE} or {\tt eATTRIBUTE_NODE} can 
   *  have a namespace URI.  {\bf Node}s created through the {\bf Document} 
   *  interface will only contain a namespace if created using 
   *  {\bf ixmlDocument_createElementNS}.
   *
   *  @return [const DOMString] A {\bf DOMString} representing the URI of the 
   *                            namespace or {\tt NULL}.
   */

EXPORT_SPEC const DOMString         
ixmlNode_getNamespaceURI(IXML_Node *nodeptr  
		           /** The {\bf Node} for which to retrieve the 
			       namespace. */
                     );

  /** Retrieves the namespace prefix, if present.  The prefix is the name
   *  used as an alias for the namespace URI for this element.  Only 
   *  {\bf Node}s of type {\tt eELEMENT_NODE} or {\tt eATTRIBUTE_NODE} can have 
   *  a prefix. {\bf Node}s created through the {\bf Document} interface will 
   *  only contain a prefix if created using {\bf ixmlDocument_createElementNS}.
   *
   *  @return [DOMString] A {\bf DOMString} representing the namespace prefix 
   *                      or {\tt NULL}.
   */

EXPORT_SPEC const DOMString               
ixmlNode_getPrefix(IXML_Node *nodeptr  
		     /** The {\bf Node} from which to retrieve the prefix. */
               );

  /** Retrieves the local name of a {\bf Node}, if present.  The local name is
   *  the tag name without the namespace prefix.  Only {\bf Node}s of type
   *  {\tt eELEMENT_NODE} or {\tt eATTRIBUTE_NODE} can have a local name.
   *  {\Bf Node}s created through the {\bf Document} interface will only 
   *  contain a local name if created using {\bf ixmlDocument_createElementNS}.
   *
   *  @return [const DOMString] A {\bf DOMString} representing the local name 
   *                            of the {\bf Element} or {\tt NULL}.
   */

EXPORT_SPEC const DOMString         
ixmlNode_getLocalName(IXML_Node *nodeptr  
		        /** The {\bf Node} from which to retrieve the local 
			    name. */
                  );

  /** Inserts a new child {\bf Node} before the existing child {\bf Node}.  
   *  {\bf refChild} can be {\tt NULL}, which inserts {\bf newChild} at the
   *  end of the list of children.  Note that the {\bf Node} (or {\bf Node}s) 
   *  in {\bf newChild} must already be owned by the owner document (or have no
   *  owner at all) of {\bf nodeptr} for insertion.  If not, the {\bf Node} 
   *  (or {\bf Node}s) must be imported into the document using 
   *  {\bf ixmlDocument_importNode}.  If {\bf newChild} is already in the tree,
   *  it is removed first.
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: Either {\bf nodeptr} or 
   *            {\bf newChild} is {\tt NULL}.
   *      \item {\tt IXML_HIERARCHY_REQUEST_ERR}: The type of the {\bf Node} 
   *            does not allow children of the type of {\bf newChild}.
   *      \item {\tt IXML_WRONG_DOCUMENT_ERR}: {\bf newChild} has an owner 
   *            document that does not match the owner of {\bf nodeptr}.
   *      \item {\tt IXML_NO_MODIFICATION_ALLOWED_ERR}: {\bf nodeptr} is 
   *            read-only or the parent of the {\bf Node} being inserted is 
   *            read-only.
   *      \item {\tt IXML_NOT_FOUND_ERR}: {\bf refChild} is not a child of 
   *            {\bf nodeptr}.
   *    \end{itemize}
   */

EXPORT_SPEC int     
ixmlNode_insertBefore(IXML_Node *nodeptr,   
		        /** The parent of the {\bf Node} before which to 
			    insert the new child. */
                      IXML_Node* newChild,      
		        /** The {\bf Node} to insert into the tree. */
                      IXML_Node* refChild       
		        /** The reference child where the new {\bf Node} 
			    should be inserted. The new {\bf Node} will
			    appear directly before the reference child. */
                  );

  /** Replaces an existing child {\bf Node} with a new child {\bf Node} in 
   *  the list of children of a {\bf Node}. If {\bf newChild} is already in 
   *  the tree, it will first be removed. {\bf returnNode} will contain the 
   *  {\bf oldChild} {\bf Node}, appropriately removed from the tree (i.e. it 
   *  will no longer have an owner document).
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMTER: Either {\bf nodeptr}, {\bf 
   *            newChild}, or {\bf oldChild} is {\tt NULL}.
   *      \item {\tt IXML_HIERARCHY_REQUEST_ERR}: The {\bf newChild} is not 
   *            a type of {\bf Node} that can be inserted into this tree or 
   *            {\bf newChild} is an ancestor of {\bf nodePtr}.
   *      \item {\tt IXML_WRONG_DOCUMENT_ERR}: {\bf newChild} was created from 
   *            a different document than {\bf nodeptr}.
   *      \item {\tt IXML_NO_MODIFICATION_ALLOWED_ERR}: {\bf nodeptr} or 
   *            its parent is read-only.
   *      \item {\tt IXML_NOT_FOUND_ERR}: {\bf oldChild} is not a child of 
   *            {\bf nodeptr}.
   *    \end{itemize}
   */

EXPORT_SPEC int     
ixmlNode_replaceChild(IXML_Node *nodeptr,     
		        /** The parent of the {\bf Node} which contains the 
			    child to replace. */
                      IXML_Node* newChild,        
		        /** The child with which to replace {\bf oldChild}. */
                      IXML_Node* oldChild,        
		        /** The child to replace with {\bf newChild}. */
                      IXML_Node** returnNode      
		        /** Pointer to a {\bf Node} to place the removed {\bf 
			    oldChild} {\bf Node}. */
                  );

  /** Removes a child from the list of children of a {\bf Node}.
   *  {\bf returnNode} will contain the {\bf oldChild} {\bf Node}, 
   *  appropriately removed from the tree (i.e. it will no longer have an 
   *  owner document).
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: Either {\bf nodeptr} or 
   *            {\bf oldChild} is {\tt NULL}.
   *      \item {\tt IXML_NO_MODIFICATION_ALLOWED_ERR}: {\bf nodeptr} or its 
   *            parent is read-only.
   *      \item {\tt IXML_NOT_FOUND_ERR}: {\bf oldChild} is not among the 
   *            children of {\bf nodeptr}.
   *    \end{itemize}
   */

EXPORT_SPEC int     
ixmlNode_removeChild(IXML_Node *nodeptr,     
		       /** The parent of the child to remove. */
                     IXML_Node* oldChild,  
		       /** The child {\bf Node} to remove. */
                     IXML_Node **returnNode
		       /** Pointer to a {\bf Node} to place the removed {\bf 
			   oldChild} {\bf Node}. */
                 );

  /** Appends a child {\bf Node} to the list of children of a {\bf Node}.  If
   *  {\bf newChild} is already in the tree, it is removed first.
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: Either {\bf nodeptr} or 
   *            {\bf newChild} is {\tt NULL}.
   *      \item {\tt IXML_HIERARCHY_REQUEST_ERR}: {\bf newChild} is of a type 
   *            that cannot be added as a child of {\bf nodeptr} or 
   *            {\bf newChild} is an ancestor of {\bf nodeptr}.
   *      \item {\tt IXML_WRONG_DOCUMENT_ERR}: {\bf newChild} was created from 
   *            a different document than {\bf nodeptr}.
   *      \item {\tt IXML_NO_MODIFICATION_ALLOWED_ERR}: {\bf nodeptr} is a 
   *            read-only {\bf Node}.
   */

EXPORT_SPEC int     
ixmlNode_appendChild(IXML_Node *nodeptr,  
		       /** The {\bf Node} in which to append the new child. */
                     IXML_Node* newChild      
		       /** The new child to append. */
                 );

  /** Queries whether or not a {\bf Node} has children.
   *
   *  @return [BOOL] {\tt TRUE} if the {\bf Node} has one or more children 
   *                 otherwise {\tt FALSE}.
   */

EXPORT_SPEC BOOL    
ixmlNode_hasChildNodes(IXML_Node *nodeptr  
		         /** The {\bf Node} to query for children. */
                   );

  /** Clones a {\bf Node}.  The new {\bf Node} does not have a parent.  The
   *  {\bf deep} parameter controls whether the subtree of the {\bf Node} is
   *  also cloned.  For details on cloning specific types of {\bf Node}s, 
   *  refer to the DOM2-Core recommendation.
   *
   *  @return [Node*] A clone of {\bf nodeptr} or {\tt NULL}.
   */

EXPORT_SPEC IXML_Node*   
ixmlNode_cloneNode(IXML_Node *nodeptr,  
		     /** The {\bf Node} to clone.  */
                   BOOL deep
		     /** {\tt TRUE} to clone the subtree also or {\tt FALSE} 
		         to clone only {\bf nodeptr}. */
                  );

  /** Queries whether this {\bf Node} has attributes.  Note that only 
   *  {\bf Element} nodes have attributes.
   *
   *  @return [BOOL] {\tt TRUE} if the {\bf Node} has attributes otherwise 
   *                 {\tt FALSE}.
   */

EXPORT_SPEC BOOL    
ixmlNode_hasAttributes(IXML_Node *nodeptr
		         /** The {\bf Node} to query for attributes. */
                      );

  /** Frees a {\bf Node} and all {\bf Node}s in its subtree.
   *
   *  @return [void] This function does not return a value.
   */

EXPORT_SPEC void    
ixmlNode_free(IXML_Node *nodeptr
		/** The {\bf Node} to free. */
             );

/*! @} */

/*================================================================
*
*   Attribute interfaces
*
*
*=================================================================*/

/**@name Interface {\it Attr}
 * The {\bf Attr} interface represents an attribute of an {\bf Element}.
 * The document type definition (DTD) or schema usually dictate the
 * allowable attributes and values for a particular element.  For more 
 * information, refer to the {\it Interface Attr} section in the DOM2-Core.
 */
/*! @{ */


  /** Frees an {\bf Attr} node.
   *
   *  @return [void] This function does not return a value.
   */

EXPORT_SPEC void    
ixmlAttr_free(IXML_Attr *attrNode  
		/** The {\bf Attr} node to free.  */
             );

/*! @} */


/*================================================================
*
*   CDATASection interfaces
*
*
*=================================================================*/

/**@name Interface {\it CDATASection}
 * The {\bf CDATASection} is used to escape blocks of text containing
 * characters that would otherwise be regarded as markup. CDATA sections
 * cannot be nested. Their primary purpose is for including material such
 * XML fragments, without needing to escape all the delimiters.  For more 
 * information, refer to the {\it Interface CDATASection} section in the
 * DOM2-Core.
 */
/*! @{ */


  /** Initializes a {\bf CDATASection} node.
   *
   *  @return [void] This function does not return a value.
   */

EXPORT_SPEC void    
ixmlCDATASection_init(IXML_CDATASection *nodeptr  
		        /** The {\bf CDATASection} node to initialize.  */
                     );


  /** Frees a {\bf CDATASection} node.
   *
   *  @return [void] This function does not return a value.
   */

EXPORT_SPEC void    
ixmlCDATASection_free(IXML_CDATASection *nodeptr  
		        /** The {\bf CDATASection} node to free. */
                     );

/*! @} */

/*================================================================
*
*   Document interfaces
*
*
*=================================================================*/

/**@name Interface {\it Document}
 * The {\bf Document} interface represents the entire XML document.
 * In essence, it is the root of the document tree and provides the
 * primary interface to the elements of the document.  For more information,
 * refer to the {\it Interface Document} section in the DOM2Core.
 */
/*! @{ */

  /** Initializes a {\bf Document} node.
   *
   *  @return [void] This function does not return a value.
   */

EXPORT_SPEC void    
ixmlDocument_init(IXML_Document *nodeptr  
		    /** The {\bf Document} node to initialize.  */
                 );

  /** Creates a new empty {\bf Document} node.  The 
   *  {\bf ixmlDocument_createDocumentEx} API differs from the {\bf
   *  ixmlDocument_createDocument} API in that it returns an error code
   *  describing the reason for the failure rather than just {\tt NULL}.
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INSUFFICIENT_MEMORY}: Not enough free memory exists 
   *            to complete this operation.
   *    \end{itemize}
   */

EXPORT_SPEC int ixmlDocument_createDocumentEx(IXML_Document** doc 
		                    /** Pointer to a {\bf Document} where the 
				        new object will be stored. */
		                  );


  /** Creates a new empty {\bf Document} node.
   *
   *  @return [Document*] A pointer to the new {\bf Document} or {\tt NULL} on 
   *                      failure.
   */

EXPORT_SPEC IXML_Document* ixmlDocument_createDocument();

  /** Creates a new {\bf Element} node with the given tag name.  The new
   *  {\bf Element} node has a {\tt nodeName} of {\bf tagName} and
   *  the {\tt localName}, {\tt prefix}, and {\tt namespaceURI} set 
   *  to {\tt NULL}.  To create an {\bf Element} with a namespace, 
   *  see {\bf ixmlDocument_createElementNS}.
   *
   *  The {\bf ixmlDocument_createElementEx} API differs from the {\bf
   *  ixmlDocument_createElement} API in that it returns an error code
   *  describing the reason for failure rather than just {\tt NULL}.
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: Either {\bf doc} or 
   *            {\bf tagName} is {\tt NULL}.
   *      \item {\tt IXML_INSUFFICIENT_MEMORY}: Not enough free memory exists 
   *            to complete this operation.
   *    \end{itemize}
   */

EXPORT_SPEC int
ixmlDocument_createElementEx(IXML_Document *doc,  
		               /** The owner {\bf Document} of the new node. */
                             const DOMString tagName,  
			       /** The tag name of the new {\bf Element} 
				   node. */
                             IXML_Element **rtElement
			       /** Pointer to an {\bf Element} where the new 
				   object will be stored. */
                            );

  /** Creates a new {\bf Element} node with the given tag name.  The new
   *  {\bf Element} node has a {\tt nodeName} of {\bf tagName} and
   *  the {\tt localName}, {\tt prefix}, and {\tt namespaceURI} set 
   *  to {\tt NULL}.  To create an {\bf Element} with a namespace, 
   *  see {\bf ixmlDocument_createElementNS}.
   *
   *  @return [Document*] A pointer to the new {\bf Element} or {\tt NULL} on 
   *                      failure.
   */

EXPORT_SPEC IXML_Element*
ixmlDocument_createElement(IXML_Document *doc,  
		             /** The owner {\bf Document} of the new node. */
                           const DOMString tagName    
			     /** The tag name of the new {\bf Element} node. */
                           );


  /** Creates a new {\bf Text} node with the given data.  
   *  The {\bf ixmlDocument_createTextNodeEx} API differs from the {\bf
   *  ixmlDocument_createTextNode} API in that it returns an error code
   *  describing the reason for failure rather than just {\tt NULL}.
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: Either {\bf doc} or {\bf data} 
   *            is {\tt NULL}.
   *      \item {\tt IXML_INSUFFICIENT_MEMORY}: Not enough free memory exists 
   *            to complete this operation.
   *    \end{itemize}
   */

EXPORT_SPEC int
ixmlDocument_createTextNodeEx(IXML_Document *doc,  
		                /** The owner {\bf Document} of the new node. */
                              const DOMString data,      
			        /** The data to associate with the new {\bf 
				    Text} node. */
                              IXML_Node** textNode 
			        /** A pointer to a {\bf Node} where the new 
				    object will be stored. */
                              );


  /** Creates a new {\bf Text} node with the given data.
   *
   *  @return [Node*] A pointer to the new {\bf Node} or {\tt NULL} on failure.
   */

EXPORT_SPEC IXML_Node*
ixmlDocument_createTextNode(IXML_Document *doc,  
		              /** The owner {\bf Document} of the new node. */
                            const DOMString data       
			      /** The data to associate with the new {\bf Text} 
			          node. */
                            );

  /** Creates a new {\bf CDATASection} node with given data.
   *
   *  The {\bf ixmlDocument_createCDATASectionEx} API differs from the {\bf
   *  ixmlDocument_createCDATASection} API in that it returns an error code
   *  describing the reason for failure rather than just {\tt NULL}.
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: Either {\bf doc} or {\bd data} 
   *            is {\tt NULL}.
   *      \item {\tt IXML_INSUFFICIENT_MEMORY}: Not enough free memory exists 
   *            to complete this operation.
   *    \end{itemize}
   */

EXPORT_SPEC int
ixmlDocument_createCDATASectionEx(IXML_Document *doc,  
		                    /** The owner {\bf Document} of the new 
				        node. */
                                  const DOMString data,      
				    /** The data to associate with the new 
				        {\bf CDATASection} node. */
                                  IXML_CDATASection** cdNode   
				    /** A pointer to a {\bf Node} where the 
				        new object will be stored. */ 
                                 );


  /** Creates a new {\bf CDATASection} node with given data.
   *
   *  @return [CDATASection*] A pointer to the new {\bf CDATASection} or 
   *                          {\tt NULL} on failure.
   */

EXPORT_SPEC IXML_CDATASection*
ixmlDocument_createCDATASection(IXML_Document *doc,  
				  /** The owner {\bf Document} of the new 
				      node. */
                                const DOMString data  
				  /** The data to associate with the new {\bf 
				      CDATASection} node. */
                               );

  /** Creates a new {\bf Attr} node with the given name.  
   *
   *  @return [Attr*] A pointer to the new {\bf Attr} or {\tt NULL} on failure.
   */

EXPORT_SPEC IXML_Attr*
ixmlDocument_createAttribute(IXML_Document *doc,  
		               /** The owner {\bf Document} of the new node. */
                             const char *name      
			       /** The name of the new attribute. */
                            );


  /** Creates a new {\bf Attr} node with the given name.  
   *
   *  The {\bf ixmlDocument_createAttributeEx} API differs from the {\bf
   *  ixmlDocument_createAttribute} API in that it returns an error code
   *  describing the reason for failure rather than just {\tt NULL}.
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: Either {\bf doc} or {\bf name} 
   *            is {\tt NULL}.
   *      \item {\tt IXML_INSUFFICIENT_MEMORY}: Not enough free memory exists 
   *            to complete this operation.
   *    \end{itemize}
   */

EXPORT_SPEC int
ixmlDocument_createAttributeEx(IXML_Document *doc,  
		                 /** The owner {\bf Document} of the new 
				     node. */
                               const char *name,      
			         /** The name of the new attribute. */
                               IXML_Attr** attrNode
			         /** A pointer to a {\bf Attr} where the new 
				     object will be stored. */
                              );


  /** Returns a {\bf NodeList} of all {\bf Elements} that match the given
   *  tag name in the order in which they were encountered in a preorder
   *  traversal of the {\bf Document} tree.  
   *
   *  @return [NodeList*] A pointer to a {\bf NodeList} containing the 
   *                      matching items or {\tt NULL} on an error.
   */

EXPORT_SPEC IXML_NodeList*
ixmlDocument_getElementsByTagName(IXML_Document *doc,     
		                    /** The {\bf Document} to search. */
                                  const DOMString tagName  
				    /** The tag name to find. */
                                 );

/* introduced in DOM level 2 */

  /** Creates a new {\bf Element} node in the given qualified name and
   *  namespace URI.
   *
   *  The {\bf ixmlDocument_createElementNSEx} API differs from the {\bf
   *  ixmlDocument_createElementNS} API in that it returns an error code
   *  describing the reason for failure rather than just {\tt NULL}.
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: Either {\bf doc}, 
   *            {\bf namespaceURI}, or {\bf qualifiedName} is {\tt NULL}.
   *      \item {\tt IXML_INSUFFICIENT_MEMORY}: Not enough free memory exists 
   *            to complete this operation.
   *    \end{itemize}
   */

EXPORT_SPEC int
ixmlDocument_createElementNSEx(IXML_Document *doc,           
		                 /** The owner {\bf Document} of the new 
				     node. */
                               const DOMString namespaceURI,  
			         /** The namespace URI for the new {\bf 
				     Element}. */
                               const DOMString qualifiedName,  
			         /** The qualified name of the new {\bf 
				     Element}. */
                               IXML_Element** rtElement
			         /** A pointer to an {\bf Element} where the 
				     new object will be stored. */
                              );


  /** Creates a new {\bf Element} node in the given qualified name and
   *  namespace URI.
   *
   *  @return [Element*] A pointer to the new {\bf Element} or {\tt NULL} on 
   *                     failure.
   */

EXPORT_SPEC IXML_Element*
ixmlDocument_createElementNS(IXML_Document *doc,           
		               /** The owner {\bf Document} of the new node. */
                             const DOMString namespaceURI,  
			       /** The namespace URI for the new {\bf 
				   Element}. */
                             const DOMString qualifiedName  
			       /** The qualified name of the new {\bf 
				   Element}. */
                             );

  /** Creates a new {\bf Attr} node with the given qualified name and
   *  namespace URI.
   *
   *  The {\bf ixmlDocument_createAttributeNSEx} API differs from the {\bf
   *  ixmlDocument_createAttributeNS} API in that it returns an error code
   *  describing the reason for failure rather than just {\tt NULL}.
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: Either {\bf doc}, 
   *            {\bf namespaceURI}, or {\bf qualifiedName} is {\tt NULL}.
   *      \item {\tt IXML_INSUFFICIENT_MEMORY}: Not enough free memory exists 
   *            to complete this operation.
   *    \end{itemize}   
   */

EXPORT_SPEC int
ixmlDocument_createAttributeNSEx(IXML_Document *doc,
		                   /** The owner {\bf Document} of the new 
				       {\bf Attr}. */
                                 const DOMString namespaceURI, 
				   /** The namespace URI for the attribute. */
                                 const DOMString qualifiedName, 
				   /** The qualified name of the attribute. */
                                 IXML_Attr** attrNode
				   /** A pointer to an {\bf Attr} where the 
				       new object will be stored. */
                                );   

  /** Creates a new {\bf Attr} node with the given qualified name and
   *  namespace URI.
   *
   *  @return [Attr*] A pointer to the new {\bf Attr} or {\tt NULL} on failure.
   */

EXPORT_SPEC IXML_Attr*
ixmlDocument_createAttributeNS(IXML_Document *doc, 
		                 /** The owner {\bf Document} of the new 
				     {\bf Attr}. */
                               const DOMString namespaceURI, 
			         /** The namespace URI for the attribute. */
                               const DOMString qualifiedName 
			         /** The qualified name of the attribute. */
                              );   

  /** Returns a {\bf NodeList} of {\bf Elements} that match the given
   *  local name and namespace URI in the order they are encountered
   *  in a preorder traversal of the {\bf Document} tree.  Either 
   *  {\bf namespaceURI} or {\bf localName} can be the special {\tt "*"}
   *  character, which matches any namespace or any local name respectively.
   *
   *  @return [NodeList*] A pointer to a {\bf NodeList} containing the 
   *                      matching items or {\tt NULL} on an error.
   */

EXPORT_SPEC IXML_NodeList*   
ixmlDocument_getElementsByTagNameNS(IXML_Document* doc,          
		                      /** The {\bf Document} to search. */
                                    const DOMString namespaceURI, 
				      /** The namespace of the elements to 
                                          find or {\tt "*"} to match any 
                                          namespace. */
                                    const DOMString localName     
				      /** The local name of the elements to 
                                          find or {\tt "*"} to match any local 
                                          name.  */
                                    );

  /** Returns the {\bf Element} whose {\tt ID} matches that given id.
   *
   *  @return [Element*] A pointer to the matching {\bf Element} or 
   *                     {\tt NULL} on an error.
   */

EXPORT_SPEC IXML_Element*    
ixmlDocument_getElementById(IXML_Document* doc,         
		              /** The owner {\bf Document} of the {\bf 
			          Element}. */
                            const DOMString tagName  
			      /** The name of the {\bf Element}.*/
                            );

  /** Frees a {\bf Document} object and all {\bf Node}s associated with it.  
   *  Any {\bf Node}s extracted via any other interface function, e.g. 
   *  {\bf ixmlDocument_GetElementById}, become invalid after this call unless
   *  explicitly cloned.
   *
   *  @return [void] This function does not return a value.
   */

EXPORT_SPEC void        
ixmlDocument_free(IXML_Document* doc  
		    /** The {\bf Document} to free.  */
                 );

  /** Imports a {\bf Node} from another {\bf Document} into this 
   *  {\bf Document}.  The new {\bf Node} does not a have parent node: it is a 
   *  clone of the original {\bf Node} with the {\tt ownerDocument} set to 
   *  {\bf doc}.  The {\bf deep} parameter controls whether all the children 
   *  of the {\bf Node} are imported.  Refer to the DOM2-Core recommendation 
   *  for details on importing specific node types.
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: Either {\bf doc} or 
   *            {\bf importNode} is not a valid pointer.
   *      \item {\tt IXML_NOT_SUPPORTED_ERR}: {\bf importNode} is a 
   *            {\bf Document}, which cannot be imported.
   *      \item {\tt IXML_FAILED}: The import operation failed because the 
   *            {\bf Node} to be imported could not be cloned.
   *    \end{itemize}
   */

EXPORT_SPEC int         
ixmlDocument_importNode(IXML_Document* doc,     
		          /** The {\bf Document} into which to import. */
                        IXML_Node* importNode,  
			  /** The {\bf Node} to import. */
                        BOOL deep,         
			  /** {\tt TRUE} to import all children of {\bf 
			      importNode} or {\tt FALSE} to import only the 
			      root node. */
                        IXML_Node** rtNode      
			  /** A pointer to a new {\bf Node} owned by {\bf 
			      doc}. */
                       );
/*! @} */

/*================================================================
*
*   Element interfaces
*
*
*=================================================================*/

/**@name Interface {\it Element}
 * The {\bf Element} interface represents an element in an XML document.
 * Only {\bf Element}s are allowed to have attributes, which are stored in the
 * {\tt attributes} member of a {\bf Node}.  The {\bf Element} interface
 * extends the {\bf Node} interface and adds more operations to manipulate
 * attributes.
 */
/*! @{ */

  /** Initializes a {\bf IXML_Element} node.
   *
   *  @return [void] This function does not return a value.
   */

EXPORT_SPEC void ixmlElement_init(IXML_Element *element  
		        /** The {\bf Element} to initialize.*/
                     );


  /** Returns the name of the tag as a constant string.
   *
   *  @return [const DOMString] A {\bf DOMString} representing the name of the 
   *                            {\bf Element}.
   */

EXPORT_SPEC const DOMString
ixmlElement_getTagName(IXML_Element* element  
		         /** The {\bf Element} from which to retrieve the 
			     name. */
                      );

  /** Retrieves an attribute of an {\bf Element} by name.  
   *
   *  @return [DOMString] A {\bf DOMString} representing the value of the 
   *                      attribute.
   */

EXPORT_SPEC const DOMString   
ixmlElement_getAttribute(IXML_Element* element,  
		           /** The {\bf Element} from which to retrieve the 
			       attribute. */
                         const DOMString name     
			   /** The name of the attribute to retrieve. */
                        );

  /** Adds a new attribute to an {\bf Element}.  If an attribute with the same
   *  name already exists, the attribute value will be updated with the
   *  new value in {\bf value}.  
   *
   *  @return [int] An integer representing of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: Either {\bf element}, 
   *            {\bf name}, or {\bf value} is {\tt NULL}.
   *      \item {\tt IXML_INVALID_CHARACTER_ERR}: {\bf name} contains an 
   *            illegal character.
   *      \item {\tt IXML_INSUFFICIENT_MEMORY}: Not enough free memory exists 
   *            to complete the operation.
   *    \end{itemize}
   */

EXPORT_SPEC int         
ixmlElement_setAttribute(IXML_Element* element,  
		           /** The {\bf Element} on which to set the 
			       attribute. */
                         const DOMString name,    
			   /** The name of the attribute. */
                         const DOMString value
			   /** The value of the attribute.  Note that this is 
			       a non-parsed string and any markup must be 
			       escaped. */
                        );

  /** Removes an attribute by name.  
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: Either {\bf element} or 
   *            {\bf name} is {\tt NULL}.
   *    \end{itemize}
   */

EXPORT_SPEC int         
ixmlElement_removeAttribute(IXML_Element* element,  
		              /** The {\bf Element} from which to remove the 
			          attribute. */
                            const DOMString name     
			      /** The name of the attribute to remove.  */
                           );              

  /** Retrieves an attribute node by name.  See 
   *  {\bf ixmlElement_getAttributeNodeNS} to retrieve an attribute node using
   *  a qualified name or namespace URI.
   *
   *  @return [Attr*] A pointer to the attribute matching {\bf name} or 
   *                  {\tt NULL} on an error.
   */

EXPORT_SPEC IXML_Attr*       
ixmlElement_getAttributeNode(IXML_Element* element,  
		               /** The {\bf Element} from which to get the 
				   attribute node.  */
                             const DOMString name     
			       /** The name of the attribute node to find. */
                            );

  /** Adds a new attribute node to an {\bf Element}.  If an attribute already
   *  exists with {\bf newAttr} as a name, it will be replaced with the
   *  new one and the old one will be returned in {\bf rtAttr}.
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: Either {\bf element} or 
   *            {\bf newAttr} is {\tt NULL}.
   *      \item {\tt IXML_WRONG_DOCUMENT_ERR}: {\bf newAttr} does not belong 
   *            to the same one as {\bf element}.
   *      \item {\tt IXML_INUSE_ATTRIBUTE_ERR}: {\bf newAttr} is already 
   *            an attribute of another {\bf Element}.
   *    \end{itemize}
   */

EXPORT_SPEC int         
ixmlElement_setAttributeNode(IXML_Element* element,  
		               /** The {\bf Element} in which to add the new 
				   attribute. */
                             IXML_Attr* newAttr,     
			       /** The new {\bf Attr} to add. */
                             IXML_Attr** rtAttr      
			       /** A pointer to an {\bf Attr} where the old 
				   {\bf Attr} will be stored.  This will have  
				   a {\tt NULL} if no prior node 
				   existed. */
                            );

  /** Removes the specified attribute node from an {\bf Element}.  
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: Either {\bf element} or 
   *            {\bf oldAttr} is {\tt NULL}.
   *      \item {\tt IXML_NOT_FOUND_ERR}: {\bf oldAttr} is not among the list 
   *            attributes of {\bf element}.
   *    \end{itemize}
   */

EXPORT_SPEC int         
ixmlElement_removeAttributeNode(IXML_Element* element,  
		                  /** The {\bf Element} from which to remove 
				      the attribute. */
                                IXML_Attr* oldAttr,     
				  /** The attribute to remove from the {\bf 
				      Element}. */
                                IXML_Attr** rtAttr      
				  /** A pointer to an attribute in which to 
				      place the removed attribute. */
                               );

  /** Returns a {\bf NodeList} of all {\it descendant} {\bf Elements} with
   *  a given tag name, in the order in which they are encountered in a
   *  pre-order traversal of this {\bf Element} tree.
   *
   *  @return [NodeList*] A {\bf NodeList} of the matching {\bf Element}s or 
   *                      {\tt NULL} on an error.
   */

EXPORT_SPEC IXML_NodeList*   
ixmlElement_getElementsByTagName(IXML_Element* element,  
		                   /** The {\bf Element} from which to start 
				       the search. */
                                 const DOMString tagName
				   /** The name of the tag for which to 
				       search. */
                                );

/* introduced in DOM 2 */

  /** Retrieves an attribute value using the local name and namespace URI.
   *
   *  @return [DOMString] A {\bf DOMString} representing the value of the 
   *                      matching attribute.
   */

EXPORT_SPEC const DOMString
ixmlElement_getAttributeNS(IXML_Element* element,       
		             /** The {\bf Element} from which to get the 
			         attribute value. */
                           const DOMString namespaceURI, 
			     /** The namespace URI of the attribute. */
                           const DOMString localname     
			     /** The local name of the attribute. */
                          );

  /** Adds a new attribute to an {\bf Element} using the local name and 
   *  namespace URI.  If another attribute matches the same local name and 
   *  namespace, the prefix is changed to be the prefix part of the 
   *  {\tt qualifiedName} and the value is changed to {\bf value}.
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: Either {\bf element}, 
   *            {\bf namespaceURI}, {\bf qualifiedName}, or {\bf value} is 
   *            {\tt NULL}.
   *      \item {\tt IXML_INVALID_CHARACTER_ERR}: {\bf qualifiedName} contains 
   *            an invalid character.
   *      \item {\tt IXML_NAMESPACE_ERR}: Either the {\bf qualifiedName} or 
   *            {\bf namespaceURI} is malformed.  Refer to the DOM2-Core for 
   *            possible reasons.
   *      \item {\tt IXML_INSUFFICIENT_MEMORY}: Not enough free memory exist 
   *            to complete the operation.
   *      \item {\tt IXML_FAILED}: The operation could not be completed.
   *    \end{itemize}
   */

EXPORT_SPEC int         
ixmlElement_setAttributeNS(IXML_Element* element,         
		             /** The {\bf Element} on which to set the 
			         attribute. */
                           const DOMString namespaceURI,   
		             /** The namespace URI of the new attribute. */
                           const DOMString qualifiedName,  
			     /** The qualified name of the attribute. */
                           const DOMString value 
			     /** The new value for the attribute. */
                          );

  /** Removes an attribute using the namespace URI and local name.
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: Either {\bf element}, 
   *            {\bf namespaceURI}, or {\bf localName} is {\tt NULL}.
   *    \end{itemize}
   */

EXPORT_SPEC int         
ixmlElement_removeAttributeNS(IXML_Element* element,        
		                /** The {\bf Element} from which to remove the 
				    the attribute. */
                              const DOMString namespaceURI,  
			        /** The namespace URI of the attribute. */
                              const DOMString localName      
			        /** The local name of the attribute.*/
                             );

  /** Retrieves an {\bf Attr} node by local name and namespace URI.
   *
   *  @return [Attr*] A pointer to an {\bf Attr} or {\tt NULL} on an error.
   */

EXPORT_SPEC IXML_Attr*       
ixmlElement_getAttributeNodeNS(IXML_Element* element,        
		                 /** The {\bf Element} from which to get the 
				     attribute. */
                               const DOMString namespaceURI,  
			         /** The namespace URI of the attribute. */
                               const DOMString localName      
			         /** The local name of the attribute. */
                              );

  /** Adds a new attribute node.  If an attribute with the same local name
   *  and namespace URI already exists in the {\bf Element}, the existing 
   *  attribute node is replaced with {\bf newAttr} and the old returned in 
   *  {\bf rcAttr}.
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: Either {\bf element} or 
   *            {\bf newAttr} is {\tt NULL}.
   *      \item {\tt IXML_WRONG_DOCUMENT_ERR}: {\bf newAttr} does not belong 
   *            to the same document as {\bf element}.
   *      \item {\tt IXML_INUSE_ATTRIBUTE_ERR}: {\bf newAttr} already is an 
   *            attribute of another {\bf Element}.
   *    \end{itemize}
   */

EXPORT_SPEC int         
ixmlElement_setAttributeNodeNS(IXML_Element* element,  
		                 /** The {\bf Element} in which to add the 
				     attribute node. */
                               IXML_Attr*   newAttr,     
			         /** The new {\bf Attr} to add. */
                               IXML_Attr**  rcAttr      
			         /** A pointer to the replaced {\bf Attr}, if 
				     it exists. */
                              );

  /** Returns a {\bf NodeList} of all {\it descendant} {\bf Elements} with a
   *  given tag name, in the order in which they are encountered in the
   *  pre-order traversal of the {\bf Element} tree.
   *
   *  @return [NodeList*] A {\bf NodeList} of matching {\bf Element}s or 
   *                      {\tt NULL} on an error.
   */

EXPORT_SPEC IXML_NodeList*   
ixmlElement_getElementsByTagNameNS(IXML_Element* element,        
		                     /** The {\bf Element} from which to start 
				         the search. */
                                   const DOMString namespaceURI,
				     /** The namespace URI of the {\bf 
				         Element}s to find. */
                                   const DOMString localName      
				     /** The local name of the {\bf Element}s 
				         to find. */
                                  );

  /** Queries whether the {\bf Element} has an attribute with the given name
   *  or a default value.
   *
   *  @return [BOOL] {\tt TRUE} if the {\bf Element} has an attribute with 
   *                 this name or has a default value for that attribute, 
   *                 otherwise {\tt FALSE}.
   */

EXPORT_SPEC BOOL        
ixmlElement_hasAttribute(IXML_Element* element, 
		           /** The {\bf Element} on which to check for an 
			       attribute. */
                         const DOMString name    
			   /** The name of the attribute for which to check. */
                        );

  /** Queries whether the {\bf Element} has an attribute with the given
   *  local name and namespace URI or has a default value for that attribute.
   *
   *  @return [BOOL] {\tt TRUE} if the {\bf Element} has an attribute with 
   *                 the given namespace and local name or has a default 
   *                 value for that attribute, otherwise {\tt FALSE}.
   */

EXPORT_SPEC BOOL        
ixmlElement_hasAttributeNS(IXML_Element* element,       
		             /** The {\bf Element} on which to check for the 
			         attribute. */
                           const DOMString namespaceURI, 
			     /** The namespace URI of the attribute. */
                           const DOMString localName     
			     /** The local name of the attribute. */
                          );

  /** Frees the given {\bf Element} and any subtree of the {\bf Element}.
   *
   *  @return [void] This function does not return a value.
   */

EXPORT_SPEC void        
ixmlElement_free(IXML_Element* element  
		   /** The {\bf Element} to free. */
                );

/*! @} */

/*================================================================
*
*   NamedNodeMap interfaces
*
*
*=================================================================*/

/**@name Interface {\it NamedNodeMap}
 * A {\bf NamedNodeMap} object represents a list of objects that can be
 * accessed by name.  A {\bf NamedNodeMap} maintains the objects in 
 * no particular order.  The {\bf Node} interface uses a {\bf NamedNodeMap}
 * to maintain the attributes of a node.
 */
/*! @{ */

  /** Returns the number of items contained in this {\bf NamedNodeMap}.
   *
   *  @return [unsigned long] The number of nodes in this map.
   */

EXPORT_SPEC unsigned long 
ixmlNamedNodeMap_getLength(IXML_NamedNodeMap *nnMap  
		             /** The {\bf NamedNodeMap} from which to retrieve 
			         the size. */
                          );

  /** Retrieves a {\bf Node} from the {\bf NamedNodeMap} by name.
   *
   *  @return [Node*] A {\bf Node} or {\tt NULL} if there is an error.
   */

EXPORT_SPEC IXML_Node*   
ixmlNamedNodeMap_getNamedItem(IXML_NamedNodeMap *nnMap, 
		                /** The {\bf NamedNodeMap} to search. */
                              const DOMString name       
			        /** The name of the {\bf Node} to find. */
                             );

  /** Adds a new {\bf Node} to the {\bf NamedNodeMap} using the {\bf Node} 
   *  name attribute.
   *
   *  @return [Node*] The old {\bf Node} if the new {\bf Node} replaces it or 
   *                  {\tt NULL} if the {\bf Node} was not in the 
   *                  {\bf NamedNodeMap} before.
   */

EXPORT_SPEC IXML_Node*   
ixmlNamedNodeMap_setNamedItem(IXML_NamedNodeMap *nnMap, 
		                /** The {\bf NamedNodeMap} in which to add the 
				    new {\bf Node}. */
                              IXML_Node *arg            
			        /** The new {\bf Node} to add to the {\bf 
				    NamedNodeMap}. */
                             );

  /** Removes a {\bf Node} from a {\bf NamedNodeMap} specified by name.
   *
   *  @return [Node*] A pointer to the {\bf Node}, if found, or {\tt NULL} if 
   *                  it wasn't.
   */

EXPORT_SPEC IXML_Node*   
ixmlNamedNodeMap_removeNamedItem(IXML_NamedNodeMap *nnMap,  
		                   /** The {\bf NamedNodeMap} from which to 
				       remove the item. */
                                 const DOMString name        
				   /** The name of the item to remove. */
                                );

  /** Retrieves a {\bf Node} from a {\bf NamedNodeMap} specified by a
   *  numerical index.
   *
   *  @return [Node*] A pointer to the {\bf Node}, if found, or {\tt NULL} if 
   *                  it wasn't.
   */

EXPORT_SPEC IXML_Node*   
ixmlNamedNodeMap_item(IXML_NamedNodeMap *nnMap, 
		        /** The {\bf NamedNodeMap} from which to remove the 
			    {\bf Node}. */
                      unsigned long index  
		        /** The index into the map to remove. */
                     );

/* introduced in DOM level 2 */

  /** Retrieves a {\bf Node} from a {\bf NamedNodeMap} specified by
   *  namespace URI and local name.
   *
   *  @return [Node*] A pointer to the {\bf Node}, if found, or {\tt NULL} if 
   *                  it wasn't
   */

EXPORT_SPEC IXML_Node*   
ixmlNamedNodeMap_getNamedItemNS(IXML_NamedNodeMap *nnMap,    
		                  /** The {\bf NamedNodeMap} from which to 
				      remove the {\bf Node}. */
                                const DOMString *namespaceURI,
				  /** The namespace URI of the {\bf Node} to 
                                      remove. */
                                const DOMString localName     
				  /** The local name of the {\bf Node} to 
				      remove. */
                               );

  /** Adds a new {\bf Node} to the {\bf NamedNodeMap} using the {\bf Node} 
   *  local name and namespace URI attributes.
   *
   *  @return [Node*] The old {\bf Node} if the new {\bf Node} replaces it or 
   *                  {\tt NULL} if the {\bf Node} was not in the 
   *                  {\bf NamedNodeMap} before.
   */

EXPORT_SPEC IXML_Node*   
ixmlNamedNodeMap_setNamedItemNS(IXML_NamedNodeMap *nnMap, 
		                  /** The {\bf NamedNodeMap} in which to add 
				      the {\bf Node}. */
                                IXML_Node *arg 
				  /** The {\bf Node} to add to the map. */
                               );

  /** Removes a {\bf Node} from a {\bf NamedNodeMap} specified by 
   *  namespace URI and local name.
   *
   *  @return [Node*] A pointer to the {\bf Node}, if found, or {\tt NULL} if 
   *          it wasn't.
   */

EXPORT_SPEC IXML_Node*   
ixmlNamedNodeMap_removeNamedItemNS(IXML_NamedNodeMap *nnMap,    
		                     /** The {\bf NamedNodeMap} from which to 
				         remove the {\bf Node}. */
                                   const DOMString namespaceURI, 
				     /** The namespace URI of the {\bf Node} 
				         to remove. */
                                   const DOMString localName     
				     /** The local name of the {\bf Node} to 
				         remove. */
                                  );

  /** Frees a {\bf NamedNodeMap}.  The {\bf Node}s inside the map are not
   *  freed, just the {\bf NamedNodeMap} object.
   *
   *  @return [void] This function does not return a value.
   */

EXPORT_SPEC void    
ixmlNamedNodeMap_free(IXML_NamedNodeMap *nnMap  
		        /** The {\bf NamedNodeMap to free}. */
                     );

/*! @} */

/*================================================================
*
*   NodeList interfaces
*
*
*=================================================================*/

/**@name Interface {\it NodeList}
 * The {\bf NodeList} interface abstracts an ordered collection of
 * nodes.  Note that changes to the underlying nodes will change
 * the nodes contained in a {\bf NodeList}.  The DOM2-Core refers to
 * this as being {\it live}.
 */
/*! @{ */

  /** Retrieves a {\bf Node} from a {\bf NodeList} specified by a 
   *  numerical index.
   *
   *  @return [Node*] A pointer to a {\bf Node} or {\tt NULL} if there was an 
   *                  error.
   */

EXPORT_SPEC IXML_Node*           
ixmlNodeList_item(IXML_NodeList *nList,     
		    /** The {\bf NodeList} from which to retrieve the {\bf 
		        Node}. */
                  unsigned long index  
		    /** The index into the {\bf NodeList} to retrieve. */
                 );

  /** Returns the number of {\bf Nodes} in a {\bf NodeList}.
   *
   *  @return [unsigned long] The number of {\bf Nodes} in the {\bf NodeList}.
   */

EXPORT_SPEC unsigned long   
ixmlNodeList_length(IXML_NodeList *nList  
		      /** The {\bf NodeList} for which to retrieve the 
		          number of {\bf Nodes}. */
                   );

  /** Frees a {\bf NodeList} object.  Since the underlying {\bf Nodes} are
   *  references, they are not freed using this operating.  This only
   *  frees the {\bf NodeList} object.
   *
   *  @return [void] This function does not return a value.
   */

EXPORT_SPEC void            
ixmlNodeList_free(IXML_NodeList *nList  
		    /** The {\bf NodeList} to free.  */
                 );

/*! @} */ /* Interface NodeList */
/*! @} */ /* DOM Interfaces */

/**@name IXML API
 * The IXML API contains utility functions that are not part of the standard
 * DOM interfaces.  They include functions to create a DOM structure from a
 * file or buffer, create an XML file from a DOM structure, and manipulate 
 * DOMString objects.
 */
/*! @{ */

/*================================================================
* 
*   ixml interfaces
*
*
*=================================================================*/

  /** Renders a {\bf Node} and all sub-elements into an XML document
   *  representation.  The caller is required to free the {\bf DOMString}
   *  returned from this function using {\bf ixmlFreeDOMString} when it
   *  is no longer required.
   *
   *  Note that this function can be used for any {\bf Node}-derived
   *  interface.  The difference between {\bf ixmlPrintDocument} and
   *  {\bf ixmlPrintNode} is {\bf ixmlPrintDocument} includes the XML prolog
   *  while {\bf ixmlPrintNode} only produces XML elements. An XML
   *  document is not well formed unless it includes the prolog
   *  and at least one element.
   *
   *  This function  introduces lots of white space to print the
   *  {\bf DOMString} in readable  format.
   * 
   *  @return [DOMString] A {\bf DOMString} with the XML document representation 
   *                      of the DOM tree or {\tt NULL} on an error.
   */

EXPORT_SPEC DOMString
ixmlPrintDocument(IXML_Document *doc);

  /** Renders a {\bf Node} and all sub-elements into an XML text
   *  representation.  The caller is required to free the {\bf DOMString}
   *  returned from this function using {\bf ixmlFreeDOMString} when it
   *  is no longer required.
   *
   *  Note that this function can be used for any {\bf Node}-derived
   *  interface.  A similar {\bf ixmlPrintDocument} function is defined
   *  to avoid casting when printing whole documents. This function
   *  introduces lots of white space to print the {\bf DOMString} in readable
   *  format.
   * 
   *  @return [DOMString] A {\bf DOMString} with the XML text representation 
   *                      of the DOM tree or {\tt NULL} on an error.
   */

EXPORT_SPEC DOMString   
ixmlPrintNode(IXML_Node *doc  
                /** The root of the {\bf Node} tree to render to XML text. */
             );

  /** Renders a {\bf Node} and all sub-elements into an XML document
   *  representation.  The caller is required to free the {\bf DOMString}
   *  returned from this function using {\bf ixmlFreeDOMString} when it
   *  is no longer required.
   *
   *  Note that this function can be used for any {\bf Node}-derived
   *  interface.  The difference between {\bf ixmlDocumenttoString} and
   *  {\bf ixmlNodetoString} is {\bf ixmlDocumenttoString} includes the XML
   *  prolog while {\bf ixmlNodetoString} only produces XML elements. An XML
   *  document is not well formed unless it includes the prolog
   *  and at least one element.
   *
   *  @return [DOMString] A {\bf DOMString} with the XML text representation 
   *                      of the DOM tree or {\tt NULL} on an error.
   */

EXPORT_SPEC DOMString
ixmlDocumenttoString(IXML_Document *doc);

  /** Renders a {\bf Node} and all sub-elements into an XML text
   *  representation.  The caller is required to free the {\bf DOMString}
   *  returned from this function using {\bf ixmlFreeDOMString} when it
   *  is no longer required.
   *
   *  Note that this function can be used for any {\bf Node}-derived
   *  interface.  The difference between {\bf ixmlNodetoString} and
   *  {\bf ixmlDocumenttoString} is {\bf ixmlNodetoString} does not include
   *  the XML prolog, it only produces XML elements.
   *
   *  @return [DOMString] A {\bf DOMString} with the XML text representation 
   *                      of the DOM tree or {\tt NULL} on an error.
   */

EXPORT_SPEC DOMString   
ixmlNodetoString(IXML_Node *doc  
		   /** The root of the {\bf Node} tree to render to XML text. */
                );


  /** Makes the XML parser more tolerant to malformed text.
   *       
   * If {\bf errorChar} is 0 (default), the parser is strict about XML 
   * encoding : invalid UTF-8 sequences or "&" entities are rejected, and 
   * the parsing aborts.
   * If {\bf errorChar} is not 0, the parser is relaxed : invalid UTF-8 
   * characters are replaced by the {\bf errorChar}, and invalid "&" entities 
   * are left untranslated. The parsing is then allowed to continue.
   */
EXPORT_SPEC void
ixmlRelaxParser(char errorChar);


  /** Parses an XML text buffer converting it into an IXML DOM representation.
   *
   *  @return [Document*] A {\bf Document} if the buffer correctly parses or 
   *                      {\tt NULL} on an error. 
   */
EXPORT_SPEC IXML_Document*
ixmlParseBuffer(const char *buffer 
		  /** The buffer that contains the XML text to convert to a 
		      {\bf Document}. */
               );


  /** Parses an XML text buffer converting it into an IXML DOM representation.
   *
   *  The {\bf ixmlParseBufferEx} API differs from the {\bf ixmlParseBuffer}
   *  API in that it returns an error code representing the actual failure
   *  rather than just {\tt NULL}.
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: The {\bf buffer} is not a valid 
   *            pointer.
   *      \item {\tt IXML_INSUFFICIENT_MEMORY}: Not enough free memory exists 
   *            to complete this operation.
   *    \end{itemize}
   */

EXPORT_SPEC int
ixmlParseBufferEx(const char *buffer, 
		    /** The buffer that contains the XML text to convert to a 
		        {\bf Document}. */
                  IXML_Document** doc 
		    /** A point to store the {\bf Document} if file correctly 
		        parses or {\bf NULL} on an error. */
                );

  /** Parses an XML text file converting it into an IXML DOM representation.
   *
   *  @return [Document*] A {\bf Document} if the file correctly parses or 
   *                      {\tt NULL} on an error.
   */

EXPORT_SPEC IXML_Document*
ixmlLoadDocument(const char* xmlFile      
		   /** The filename of the XML text to convert to a {\bf 
		       Document}. */
                );

  /** Parses an XML text file converting it into an IXML DOM representation.
   *
   *  The {\bf ixmlLoadDocumentEx} API differs from the {\bf ixmlLoadDocument}
   *  API in that it returns a an error code representing the actual failure
   *  rather than just {\tt NULL}.
   *
   *  @return [int] An integer representing one of the following:
   *    \begin{itemize}
   *      \item {\tt IXML_SUCCESS}: The operation completed successfully.
   *      \item {\tt IXML_INVALID_PARAMETER}: The {\bf xmlFile} is not a valid 
   *            pointer.
   *      \item {\tt IXML_INSUFFICIENT_MEMORY}: Not enough free memory exists 
   *            to complete this operation.
   *    \end{itemize}
   */

EXPORT_SPEC int 
ixmlLoadDocumentEx(const char* xmlFile,      
		     /** The filename of the XML text to convert to a {\bf 
		         Document}. */
                   IXML_Document** doc   
		     /** A pointer to the {\bf Document} if file correctly 
		         parses or {\bf NULL} on an error. */
                 );

  /** Clones an existing {\bf DOMString}.
   *
   *  @return [DOMString] A new {\bf DOMString} that is a duplicate of the 
   *                      original or {\tt NULL} if the operation could not 
   *                      be completed.
   */

EXPORT_SPEC DOMString   
ixmlCloneDOMString(const DOMString src  
		     /** The source {\bf DOMString} to clone. */
                  );

  /** Frees a {\bf DOMString}.
   *
   *  @return [void] This function does not return a value.
   */

EXPORT_SPEC void        
ixmlFreeDOMString(DOMString buf  
		    /** The {\bf DOMString} to free. */
                 );

#ifdef __cplusplus
}
#endif

/*! @} */ /* IXML API */

#endif  /* _IXML_H_ */