File: domxml.xml

package info (click to toggle)
phpdoc 20020310-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 35,272 kB
  • ctags: 354
  • sloc: xml: 799,767; php: 1,395; cpp: 500; makefile: 200; sh: 140; awk: 51
file content (996 lines) | stat: -rw-r--r-- 27,732 bytes parent folder | download
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
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.35 $ -->
 <reference id="ref.domxml">
  <title>DOM XML functions</title>
  <titleabbrev>DOM XML</titleabbrev>

  <partintro>
   &warn.experimental;
   <simpara>
    This documentation is not finished yet. Don't start to translate it
    or use it as a programming reference (steinm@php.net).
   </simpara>
   <simpara>
    These functions are only available if PHP was configured with
    <option role="configure">--with-dom=[DIR]</option>, using the
    <ulink url="&url.domxml;">GNOME xml library</ulink>.
    You will need at least libxml-2.2.7
    These functions have been added in PHP 4.
   </simpara>
   <simpara>
    The extension allows you to operate on an XML document with the DOM API.
    It also provides a function <function>xmltree</function> to turn the
    complete XML document into a tree of PHP objects. Currently this
    tree should be considered read-only - you can modify it but this
    would not make any sense since <function>dumpmem</function> cannot be
    applied to it. Therefore, if you want to read an XML file and write
    a modified version use the <function>add_node</function>,
    <function>set_attribute</function>, etc. and finally
    <function>dumpmem</function> functions.
   </simpara>
   <simpara>
    This module defines the following constants:
   </simpara>
   <table>
    <title>XML constants</title>
    <tgroup cols="3">
     <thead>
      <row>
       <entry>Constant</entry>
       <entry>Value</entry>
       <entry>Description</entry>
      </row>
     </thead>
     <tbody>
      <row>
       <entry>XML_ELEMENT_NODE</entry>
       <entry>1</entry>
       <entry>Node is an element</entry>
      </row>
      <row>
       <entry>XML_ATTRIBUTE_NODE</entry>
       <entry>2</entry>
       <entry>Node is an attribute</entry>
      </row>
      <row>
       <entry>XML_TEXT_NODE</entry>
       <entry>3</entry>
       <entry>Node is a piece of text</entry>
      </row>
      <row>
       <entry>XML_CDATA_SECTION_NODE</entry>
       <entry>4</entry>
       <entry></entry>
      </row>
      <row>
       <entry>XML_ENTITY_REF_NODE</entry>
       <entry>5</entry>
       <entry></entry>
      </row>
      <row>
       <entry>XML_ENTITY_NODE</entry>
       <entry>6</entry>
       <entry>Node is an entity like &amp;nbsp;</entry>
      </row>
      <row>
       <entry>XML_PI_NODE</entry>
       <entry>7</entry>
       <entry>Node is a processing instruction</entry>
      </row>
      <row>
       <entry>XML_COMMENT_NODE</entry>
       <entry>8</entry>
       <entry>Node is a comment</entry>
      </row>
      <row>
       <entry>XML_DOCUMENT_NODE</entry>
       <entry>9</entry>
       <entry>Node is a document</entry>
      </row>
      <row>
       <entry>XML_DOCUMENT_TYPE_NODE</entry>
       <entry>10</entry>
       <entry></entry>
      </row>
      <row>
       <entry>XML_DOCUMENT_FRAG_NODE</entry>
       <entry>11</entry>
       <entry></entry>
      </row>
      <row>
       <entry>XML_NOTATION_NODE</entry>
       <entry>12</entry>
       <entry></entry>
      </row>
      <row>
       <entry>XML_GLOBAL_NAMESPACE</entry>
       <entry>1</entry>
       <entry></entry>
      </row>
      <row>
       <entry>XML_LOCAL_NAMESPACE</entry>
       <entry>2</entry>
       <entry></entry>
      </row>
     </tbody>
    </tgroup>
   </table>
   <simpara>
    Each function in this extension can be used in two ways. In a non-object
    oriented way by passing the object to apply the function to as a first
    argument, or in an object oriented way by calling the function as a method
    of an object. This documentation describes the non-object oriented
    functions, though you get the object methods by skipping the prefix
    "domxml_".
   </simpara>
   <simpara>
    This module defines a number of classes, which are listed &mdash;
    including their
    properties and method &mdash; in the following table.
   </simpara>
   <para>
   <table>
    <title>DomDocument class (methods)</title>
    <tgroup cols="3">
     <thead>
      <row>
       <entry>Method name</entry>
       <entry>Function name</entry>
       <entry>Description</entry>
      </row>
     </thead>
     <tbody>
      <row>
       <entry>root</entry>
       <entry><function>domxml_root</function></entry>
       <entry></entry>
      </row>
      <row>
       <entry>children</entry>
       <entry><function>domxml_children</function></entry>
       <entry></entry>
      </row>
      <row>
       <entry>add_root</entry>
       <entry><function>domxml_add_root</function></entry>
       <entry></entry>
      </row>
      <row>
       <entry>dtd</entry>
       <entry><function>domxml_intdtd</function></entry>
       <entry></entry>
      </row>
      <row>
       <entry>dumpmem</entry>
       <entry><function>domxml</function></entry>
       <entry></entry>
      </row>
      <row>
       <entry>xpath_init</entry>
       <entry>xpath_init</entry>
       <entry></entry>
      </row>
      <row>
       <entry>xpath_new_context</entry>
       <entry>xpath_new_context</entry>
       <entry></entry>
      </row>
      <row>
       <entry>xptr_new_context</entry>
       <entry>xptr_new_context</entry>
       <entry></entry>
      </row>
     </tbody>
    </tgroup>
   </table>
   </para>

   <para>
   <table>
    <title>DomDocument class (attributes)</title>
    <tgroup cols="3">
     <thead>
      <row>
       <entry>Name</entry>
       <entry>Type</entry>
       <entry>Description</entry>
      </row>
     </thead>
     <tbody>
      <row>
       <entry>doc</entry>
       <entry>class DomDocument</entry>
       <entry>The object itself</entry>
      </row>
      <row>
       <entry>name</entry>
       <entry>string</entry>
       <entry></entry>
      </row>
      <row>
       <entry>url</entry>
       <entry>string</entry>
       <entry></entry>
      </row>
      <row>
       <entry>version</entry>
       <entry>string</entry>
       <entry>Version of XML</entry>
      </row>
      <row>
       <entry>encoding</entry>
       <entry>string</entry>
       <entry></entry>
      </row>
      <row>
       <entry>standalone</entry>
       <entry>long</entry>
       <entry>1 if the file is a standalone version</entry>
      </row>
      <row>
       <entry>type</entry>
       <entry>long</entry>
       <entry>One of the constants in table ... </entry>
      </row>
      <row>
       <entry>compression</entry>
       <entry>long</entry>
       <entry>1 if the file is compressed</entry>
      </row>
      <row>
       <entry>charset</entry>
       <entry>long</entry>
       <entry></entry>
      </row>
     </tbody>
    </tgroup>
   </table>
   </para>

   <para>
   <table>
    <title>DomNode class (methods)</title>
    <tgroup cols="3">
     <thead>
      <row>
       <entry>Name</entry>
       <entry>PHP name</entry>
       <entry>Description</entry>
      </row>
     </thead>
     <tbody>
      <row>
       <entry>lastchild</entry>
       <entry><function>domxml_last_child</function></entry>
       <entry></entry>
      </row>
      <row>
       <entry>children</entry>
       <entry><function>domxml_children</function></entry>
       <entry></entry>
      </row>
      <row>
       <entry>parent</entry>
       <entry><function>domxml_parent</function></entry>
       <entry></entry>
      </row>
      <row>
       <entry>new_child</entry>
       <entry><function>domxml_new_child</function></entry>
       <entry></entry>
      </row>
      <row>
       <entry>get_attribute</entry>
       <entry><function>domxml_get_attribute</function></entry>
       <entry></entry>
      </row>
      <row>
       <entry>set_attribute</entry>
       <entry><function>domxml_set_attribute</function></entry>
       <entry></entry>
      </row>
      <row>
       <entry>attributes</entry>
       <entry><function>domxml_attributes</function></entry>
       <entry></entry>
      </row>
      <row>
       <entry>node</entry>
       <entry><function>domxml_node</function></entry>
       <entry></entry>
      </row>
      <row>
       <entry><function>set_content</function></entry>
       <entry>domxml_set_content</entry>
       <entry></entry>
      </row>
     </tbody>
    </tgroup>
   </table>
   </para>

   <para>
   <table>
    <title>DomNode class (attributes)</title>
    <tgroup cols="3">
     <thead>
      <row>
       <entry>Name</entry>
       <entry>Type</entry>
       <entry>Description</entry>
      </row>
     </thead>
     <tbody>
      <row>
       <entry>node</entry>
       <entry>class DomNode</entry>
       <entry>The object itself</entry>
      </row>
      <row>
       <entry>type</entry>
       <entry>long</entry>
       <entry></entry>
      </row>
      <row>
       <entry>tagname</entry>
       <entry>string</entry>
       <entry></entry>
      </row>
      <row>
       <entry>content</entry>
       <entry>string</entry>
       <entry></entry>
      </row>
     </tbody>
    </tgroup>
   </table>
   </para>

  </partintro>

  <!-- class Dom document -->
  <!-- has member functions
        array root([int doc_handle]) 
           returns array of root nodes of this document. Array
           elements are objects of class "Dom node" having properties of
           "node" (resource), "type" (long), "name" (string)
           and optionally "content" (string).

        array children([ int node ])
           returns an array of child nodes of this element. Array
           elements are objects of class "Dom node" having properties
           of "node" (resource), "type" (long), "name" (string)
           and optionally "content" (string).

        object add_root([int doc_handle,] string name)
           Add a root node to document.

           returns an object of class "Dom node" having properties
           of "node" (resource), "type" (long), "name" (string)
           and optionally "content" (string). 

        object intdtd([int doc_handle])
           returns the DTD of document.

           returns an object of class "Dtd" having properties
           of "dtd" (resource), "sysid" (string), "name" (string)
           and optionally "extid" (string).

        string dumpmem([int doc_handle])
           dumps document into string.
    -->

   <!-- class Dom node
        object lastchild([int node])
          returns Dom node object

        array children([int node])
          as above

        object parent([ int node])
          returns Dom node object
          (parent of this node)

        new_child
        string getattr([int node,] string attrname)
          get value of attribute named attrname

        bool setattr([int node,] string attrname, string value)
          set value of given attribute.

        array attributes([int node])
          returns associative array of (string name, string value)
          pairs.

        object node(string name)
          creates a named Dom node object.
    -->

  <!-- class Dom Attribute
       name
    -->

  <!-- class Dom Namespace
    -->

  <!-- class Dtd
    -->        

  <refentry id="function.xmldoc">
   <refnamediv>
    <refname>xmldoc</refname>
    <refpurpose>Creates a DOM object of an XML document</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>object</type><methodname>xmldoc</methodname>
      <methodparam><type>string</type><parameter>str</parameter></methodparam>
     </methodsynopsis>
    &warn.experimental.func;
    <para>
     The function parses the XML document in
     <parameter>str</parameter> and returns an object of class "Dom
     document", having the properties as listed above.
    </para>
    <simpara>
     See also <function>xmldocfile</function>
    </simpara>
   </refsect1>
  </refentry>

  <refentry id="function.xmldocfile">
   <refnamediv>
    <refname>xmldocfile</refname>
    <refpurpose>Creates a DOM object from XML file</refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>object</type><methodname>xmldocfile</methodname>
      <methodparam><type>string</type><parameter>filename</parameter></methodparam>
     </methodsynopsis>
    &warn.experimental.func;
    <para>
     The function parses the XML document in the file named
     <parameter>filename</parameter> and returns an object of class
     "Dom document", having the properties as listed above.
     The file is accessed read-only.
    </para>
    <simpara>
     See also <function>xmldoc</function>
    </simpara>
   </refsect1>
  </refentry>

  <refentry id="function.xmltree">
   <refnamediv>
    <refname>xmltree</refname>
    <refpurpose>
     Creates a tree of PHP objects from XML document
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>object</type><methodname>xmltree</methodname>
      <methodparam><type>string</type><parameter>str</parameter></methodparam>
     </methodsynopsis>
    &warn.experimental.func;
    <para>
     The function parses the XML document in
     <parameter>str</parameter> and returns a tree PHP objects as the
     parsed document. This function is isolated from the other functions,
     which means you cannot access the tree with any of the other functions.
     Modifying it, for example by adding nodes, makes no sense since there
     is currently no way to dump it as an XML file.
     However this function may be valuable if you want to read a file and
     investigate the content.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.domxml-root">
   <refnamediv>
    <refname>domxml_root</refname>
    <refpurpose>
     Returns root element node
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>object</type><methodname>domxml_root</methodname>
      <methodparam><type>object</type><parameter>doc</parameter></methodparam>
     </methodsynopsis>
    &warn.experimental.func;
    <para>
     <function>domxml_root</function> takes one argument, an object of class 
     "Dom document", and returns the root element node. There are actually 
     other possible nodes like comments which are currently disregarded.
    </para>
    <para>
     The following example returns just the element with name CHAPTER and
     prints it. The other root node -- the comment -- is not returned.
     <example>
      <title>Retrieving root element</title>
      <programlisting role="php">
<![CDATA[
<?php
$xmlstr = "<?xml version='1.0' standalone='yes'?>
<!DOCTYPE chapter SYSTEM '/share/sgml/Norman_Walsh/db3xml10/db3xml10.dtd'
[ <!ENTITY sp \"spanish\">
]>
<!-- lsfj  -->
<chapter language='en'><title language='en'>Title</title>
 <para language='ge'>
  &amp;sp;
  <!-- comment -->
  <informaltable language='&amp;sp;'>
   <tgroup cols='3'>
    <tbody>
     <row><entry>a1</entry><entry
morerows='1'>b1</entry><entry>c1</entry></row>
<row><entry>a2</entry><entry>c2</entry></row>
     <row><entry>a3</entry><entry>b3</entry><entry>c3</entry></row>
    </tbody>
   </tgroup>
  </informaltable>
 </para>
</chapter>";

if(!$dom = xmldoc($xmlstr)) {
  echo "Error while parsing the document\n";
  exit;
}

$root = $dom->root();
/* or $root = domxml_root($dom); */
print_r($root);
?>
]]>
      </programlisting>
     </example>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.domxml-add-root">
   <refnamediv>
    <refname>domxml_add_root</refname>
    <refpurpose>
     Adds a further root node
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>resource</type><methodname>domxml_add_root</methodname>
      <methodparam><type>resource</type><parameter>doc</parameter></methodparam>
      <methodparam><type>string</type><parameter>name</parameter></methodparam>
     </methodsynopsis>
    &warn.experimental.func;
    <para>
     Adds a root element node to a dom document and returns the new node.
     The element name is given in the second parameter.
    </para>
    <para>
     <example>
      <title>Creating a simple HTML document header</title>
      <programlisting role="php">
<![CDATA[
<?php
$doc = new_xmldoc("1.0");
$root = $doc->add_root("HTML");
$head = $root->new_child("HEAD", "");
$head->new_child("TITLE", "Hier der Titel");
echo $doc->dumpmem();
?>
]]>
      </programlisting>
     </example>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.domxml-dumpmem">
   <refnamediv>
    <refname>domxml_dumpmem</refname>
    <refpurpose>
     Dumps the internal XML tree back into a string
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>domxml_dumpmem</methodname>
      <methodparam><type>resource</type><parameter>doc</parameter></methodparam>
     </methodsynopsis>
    &warn.experimental.func;
    <para>
     Creates an XML document from the dom representation. This function
     usually is called after a building a new dom document from scratch
     as in the example of <function>domxml_add_root</function>.
    </para>
    <para>
     See also <function>domxml_add_root</function>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.domxml-attributes">
   <refnamediv>
    <refname>domxml_attributes</refname>
    <refpurpose>
     Returns an array of attributes of a node
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>domxml_attributes</methodname>
      <methodparam><type>resource</type><parameter>node</parameter></methodparam>
     </methodsynopsis>
    &warn.experimental.func;
    <para>
     Returns all attributes of a node as array of objects of type
     "dom attribute".
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.domxml-get-attribute">
   <refnamediv>
    <refname>domxml_get_attribute</refname>
    <refpurpose>
     Returns a certain attribute of a node
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>object</type><methodname>domxml_get_attribute</methodname>
      <methodparam><type>resource</type><parameter>node</parameter></methodparam>
      <methodparam><type>string</type><parameter>name</parameter></methodparam>
     </methodsynopsis>
    &warn.experimental.func;
    <para>
     Returns the attribute with name <parameter>name</parameter> of the given
     node.
    </para>
    <simpara>
     See also <function>domxml_set_attribute</function>
    </simpara>
   </refsect1>
  </refentry>

  <refentry id="function.domxml-set-attribute">
   <refnamediv>
    <refname>domxml_set_attribute</refname>
    <refpurpose>
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>object</type><methodname>domxml_set_attribute</methodname>
      <methodparam><type>resource</type><parameter>node</parameter></methodparam>
      <methodparam><type>string</type><parameter>name</parameter></methodparam>
      <methodparam><type>string</type><parameter>value</parameter></methodparam>
     </methodsynopsis>
    &warn.experimental.func;
    <para>
     Sets an attribute with name <parameter>name</parameter> of the given
     node on a value.
    </para>
    <para>
     If we take the example from <function>domxml_add_root</function> it
     is simple to add an attribute to the HEAD element by the simply calling
     the <function>set_attribute</function> function of the node class.
     <example>
      <title>Adding an attribute to an element</title>
      <programlisting role="php">
<![CDATA[
<?php
$doc = new_xmldoc("1.0");
$root = $doc->add_root("HTML");
$head = $root->new_child("HEAD", "");
$head->new_child("TITLE", "Hier der Titel");
$head->set_attribute("Language", "ge");
echo $doc->dumpmem();
?>
]]>
      </programlisting>
     </example>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.domxml-children">
   <refnamediv>
    <refname>domxml_children</refname>
    <refpurpose>
     Returns children of a node or document
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>domxml_children</methodname>
      <methodparam><type>object</type><parameter>doc|node</parameter></methodparam>
     </methodsynopsis>
    &warn.experimental.func;
    <para>
     Returns all children of a node as an array of nodes.
    </para>
    <para>
     In the following example the variable <varname>children</varname> will
     contain an array with one node of type XML_ELEMENT. This node is
     the TITLE element.
     <example>
      <title>Adding an attribute to an element</title>
      <programlisting role="php">
<![CDATA[
<?php
$doc = new_xmldoc("1.0");
$root = $doc->add_root("HTML");
$head = $root->new_child("HEAD", "");
$head->new_child("TITLE", "Hier der Titel");
$head->set_attribute("Language", "ge");
$children = $head->children();
?>
]]>
      </programlisting>
     </example>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.domxml-new-child">
   <refnamediv>
    <refname>domxml_new_child</refname>
    <refpurpose>
     Adds new child node
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>resource</type><methodname>domxml_new_child</methodname>
      <methodparam><type>string</type><parameter>name</parameter></methodparam>
      <methodparam><type>string</type><parameter>content</parameter></methodparam>
     </methodsynopsis>
    &warn.experimental.func;
    <para>
     Adds a new child of type element to a node and returns it.
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.domxml-new-xmldoc">
   <refnamediv>
    <refname>domxml_new_xmldoc</refname>
    <refpurpose>
     Creates new empty XML document
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>object</type><methodname>domxml_new_xmldoc</methodname>
      <methodparam><type>string</type><parameter>version</parameter></methodparam>
     </methodsynopsis>
    &warn.experimental.func;
    <para>
     Creates a new dom document from scratch and returns it.
    </para>
    <para>
     See also <function>domxml_add_root</function>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.xpath-new-context">
   <refnamediv>
    <refname>xpath_new_context</refname>
    <refpurpose>
     Creates new xpath context
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>object</type><methodname>xpath_new_context</methodname>
      <methodparam><type>object</type><parameter>dom document</parameter></methodparam>
     </methodsynopsis>
    &warn.experimental.func;
    <para>
    </para>
    <para>
     See also <function>xpath_eval</function>
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.xpath-eval">
   <refnamediv>
    <refname>xpath_eval</refname>
    <refpurpose>
     Evaluates the XPath Location Path in the given string 
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>xpath_eval</methodname>
      <methodparam><type>object</type><parameter>xpath context</parameter></methodparam>
     </methodsynopsis>
    &warn.experimental.func;
    <para>
    </para>
    <para>
     See also <function>xpath_new_context</function>
    </para>
   </refsect1>
  </refentry>

  <refentry id='function.domxml-node'>
   <refnamediv>
    <refname>domxml_node</refname>
    <refpurpose>
     Creates node
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>object</type><methodname>domxml_node</methodname>
      <methodparam><type>string</type><parameter>name</parameter></methodparam>
     </methodsynopsis>
    <para>
     &warn.undocumented.func;
    </para>
   </refsect1>
  </refentry>

 <refentry id='function.domxml-node-set-content'>
   <refnamediv>
    <refname>domxml_node_set_content</refname>
    <refpurpose>
     Sets content of a node
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>bool</type><methodname>domxml_node_set_content</methodname>
      <methodparam><type>string</type><parameter>content</parameter></methodparam>
     </methodsynopsis>
    <para>
     &warn.undocumented.func;
    </para>
   </refsect1>
  </refentry>

 <refentry id='function.domxml-node-unlink-node'>
   <refnamediv>
    <refname>domxml_node_unlink_node</refname>
    <refpurpose>
     Deletes node
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>object</type><methodname>domxml_node_unlink_node</methodname>
      <void/>
     </methodsynopsis>
    <para>
     &warn.undocumented.func;
    </para>
   </refsect1>
  </refentry>

  <refentry id="function.xpath-eval-expression">
   <refnamediv>
    <refname>xpath_eval_expression</refname>
    <refpurpose>
     Evaluates the XPath Location Path in the given string 
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>array</type><methodname>xpath_eval_expression</methodname>
      <methodparam><type>object</type><parameter>xpath_context</parameter></methodparam>
     </methodsynopsis>
     &warn.experimental.func;
    <para>
    </para>
    <para>
     See also <function>xpath_eval</function>
    </para>
   </refsect1>
  </refentry>

  <refentry id='function.domxml-version'>
   <refnamediv>
    <refname>domxml_version</refname>
    <refpurpose>
     Get XML library version
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>domxml_version</methodname>
      <void/>
     </methodsynopsis>
    <para>
     This function returns the version of the XML library version currently used.
    </para>
   </refsect1>
  </refentry>

  <refentry id='function.xptr-new-context'>
   <refnamediv>
    <refname>xptr_new_context</refname>
    <refpurpose>
     Create new XPath Context
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>string</type><methodname>xptr_new_context</methodname>
      <methodparam choice="opt"><type>object</type><parameter>doc_handle</parameter></methodparam>
     </methodsynopsis>
    <para>
     &warn.undocumented.func;
    </para>
   </refsect1>
  </refentry>

  <refentry id='function.xptr-eval'>
   <refnamediv>
    <refname>xptr_eval</refname>
    <refpurpose>
     Evaluate the XPtr Location Path in the given string
    </refpurpose>
   </refnamediv>
   <refsect1>
    <title>Description</title>
     <methodsynopsis>
      <type>int</type><methodname>xptr_eval</methodname>
      <methodparam choice="opt"><type>object</type><parameter>xpath_context</parameter></methodparam>
      <methodparam><type>string</type><parameter>eval_str</parameter></methodparam>
     </methodsynopsis>
    <para>
     &warn.undocumented.func;
    </para>
   </refsect1>
  </refentry>

 </reference>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->