Source

perl-XML-LibXML / example / libxml.xml

  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
<module name="XML::LibXML">
<class name="XML::LibXML::Document">
<short>DOM Document Class</short>
<description>
	The Document Class is the result of a parsing process. But
	sometimes it is necessary to create a Document from
	scratch. The DOM Document Class provides functions that are
	conform to the DOM Core naming style.

    It inherits all functions from <i>XML::LibXML::Node</i> as
    specified in DOM Level2. This enables to access the nodes beside
    the root element on document level - a <i>DTD</i> for example. The
    support for these nodes is limited at the moment, so I would
    recommend, not to use <i>node</i> functions on <i>documents</i>.

    It is suggested that one should always create a node not bound to
    any document.  There is no need of really including the node to
    the document, but once the node is bound to a document, it is
    quite safe that all strings have the correct encoding.  If an
    unbound textnode with an iso encoded string is created (e.g. with
    $CLASS->new()), the <i>toString</i> function may not return the
    expected result.
  
    This seems like a limitation as long UTF8 encoding is assured. If
    iso encoded strings come into play it is much safer to use the
    node creation functions of <b>XML::LibXML::Document</b>. 

<method name="new" 
	synopsis="$dom = XML::LibXML::Document->new( $version, $encoding );">
	alias for createDocument()
</method>

<method name="createDocument" 
	synopsis="$dom = XML::LibXML::Document->createDocument( $version, $encoding );">
	The constructor for the document class. As Parameter it takes
	the version string and (optionally) the ecoding string.
	Simply calling <b>createDocument</b> will create the document:

<example><![CDATA[
  <?xml version="your version" encoding="your encoding"?>
]]></example>

     Both parameter are optional. The default value for <b>$version</b> is
     <i>1.0</i>, of course. If the <b>$encoding</b> parameter is not set,
     the encoding will be left unset, which means UTF8 is implied (and set).

     The call of <b>createDocument</b> without any parameter will result the
     following code:

<example><![CDATA[
  <?xml version="1.0"?>
]]></example>
</method>

<method name="getEncoding" synopsis="$strEncoding = $doc->getEncoding();">
    returns the encoding string of the document
</method>

<method name="getVersion" synopsis="$strVersion = $doc->getVersion();">
    returns the version string of the document
</method>

<method name="toString" 
	synopsis="$docstring = $dom->toString([$format]);">
	<b>toString</b> is a deparsing function, so the DOM Tree can
	be translated into a string, ready for output.

    The optional <b>$format</b> parameter sets the indenting of the 
    output. This parameter is expected to be an <i>integer</i> value,
    that specifies the number of linebreaks for each node.

    For more information about the formatted output check the documentation
    of <i>xmlDocDumpFormatMemory</i> in <i>libxml2/tree.h</i>.
</method>

<method name="toStringHTML"
    synopsis="$document->toStringHTML();">
    <b>toStringHTML</b> deparses the tree to a string as HTML. With 
    this method indenting is automatic and managed by libxml2 internally.
</method>

<method name="is_valid" 
	synopsis="$bool = $dom->is_valid();">
	Returns either TRUE or FALSE depending on the DOM Tree is a
	valid Document or not.
</method>

<method name="getDocumentElement" 
	synopsis="$root = $dom->getDocumentElement($name, $namespace );">
	Returns the root element of the Document. A document can have
	just one root element to contain the documents data.
</method>

<method name="doumentElement" 
    synopsis="$root = $dom->documentElement;">
    Alias for <b>getDocumentElement</b>.
</method>

<method name="setDocumentElement" 
	synopsis="$dom->setDocumentElement( $root );"> 
	This function enables you to set the root element for a
	document. The function supports the import of a node from a
	different document tree.
</method>

<method name="createElement" 
	synopsis="$element = $dom->createElement( $nodename );">
	This function creates a new Element Node bound to the DOM with
	the name <i>$nodename</i>.
</method>

<method name="createElementNS" 
	synopsis="$element = $dom->createElementNS( $namespaceURI, $qname );">
    This function creates a new Element Node bound to the DOM with
    the name <i>$nodename</i> and placed in the given namespace.
</method>

<method name="createTextNode" 
	synopsis="$text = $dom->createTextNode( $content_text );">
	As an equivalent of <b>createElement</b>, but it creates a
	<b>Text Node</b> bound to the DOM.
</method>

<method name="createComment" 
	synopsis="$comment = $dom->createComment( $comment_text );">
	As an equivalent of <b>createElement</b>, but it creates a
	<b>Comment Node</b> bound to the DOM.
</method>

<method name="createAttribute"
     synopsis="$attrnode = $doc->createAttribute($name [,$value]);">
     Creates a new Attribute node. 
</method>

<method name="createDocumentFragment"
    synopsis="$fragment = $doc->createDocumentFragment()">
    This function creates a DocumentFragment. 
</method>

<method name="createAttributeNS"
     synopsis="$attrnode = $doc->createAttributeNS( namespaceURI, $name [,$value] );">
     Creates an Attribute bound to a namespace.
</method>

<method name="createCDATASection" synopsis="$cdata = $dom->create( $cdata_content );">
	Similar to createTextNode and createComment, this function creates a CDataSection 
	bound to the current DOM.
</method>

<method name="importNode"
    synopsis="$document->importNode( $node [, $move] );">

    If a node is not part of a document, it can be imported to another
    document. As specified in DOM  Level 2 Specification the Node will
    not be altered or removed from its original document by default. 
    (<i>$node->cloneNode(1)</i> will get called implicitly). 

    Sometimes it is nessecary to <i>move</i> a node between
    documents. In such a case the node will not be copied, but removed
    from the original document.
</method>

</description>
<also>
  <item name="XML::LibXML"/>
  <item name="XML::LibXML::Element"/>
  <item name="XML::LibXML::Text"/>
  <item name="XML::LibXML::Attr"/>
  <item name="XML::LibXML::Comment"/>
  <item name="XML::LibXML::DocumentFragment"/>
</also>
<version>0.95</version>
</class>

<class name="XML::LibXML::Node">
<short>"virtual" Base Class DOM-Nodes</short>
<description>
	LibXML::Node defines functions that are common to all Node
	Types.  A LibXML::Node should never be created standalone, but
	as an instance of a high level class such as LibXML::Element
	or LibXML::Text.  The class itself should provide only common
	functionality.

<method name="getName" 
	synopsis="$name = $node->getName();">
	Returns the node's name. This Function is aware about namesaces
	and returns the full name of the current node
	(<i>prefix:localname</i>)
</method>

<method name="nodeName"
    synopsis="$name = $node->nodeName;">
    Alias for <b>getName()</b>.
</method>

<method name="setName"
    synopsis="$node->setName( $newName );"> 
    In very limited situation it is usefull to change a nodes name. In
    the DOM specification this should throw an error. This Function is 
    not aware about namespaces yet. 
</method>

<method name="isEqual" synopsis="$bool = $node->isEqual( $other_node );">
    returns TRUE (1) if documents refer to the same nodestructure,
    otherwise FALSE (0) is returned.
</method>

<method name="getData" synopsis="$content = $node->getData()">
	If the node has any content (such as stored in a <i>text
	node</i>) it can get requested through this function.
</method>

<method name="nodeValue" synopsis="$content = $node->nodeValue;">
    Alias for <b>getData</b>
</method>

<method name="getType" 
	synopsis="$type = $node->getType();">
	Retrun the node's type. The possible types are described in
	the libxml2 <b>tree.h</b> documentation. The return value of this 
    function is a numeric value. Therefore it differst with the result
    of perl ref function.
</method>

<method name="nodeType"
    synopsis="$type = $node->nodeType;">
    Alias for <b>getType</b>.
</method>

<method name="unbindNode" 
	synopsis="$node->unbindNode()">
	Unbinds the Node from its siblings and Parent, but not from the
	Document it belongs to. If the node is not inserted into the 
	DOM afterwards it will be lost after the programm terminated.
</method>

<method name="removeChild" 
	synopsis="$childnode = $node->removeChild( $childnode )">
	This will unbind the Child Node from its parent <i>$node</i>. 
	The function returns the unbound node.
	If <i>oldNode</i> is not a child of the given Node the
	function will fail.
</method>

<method name="replaceChild" 
	synopsis="$oldnode = $node->replaceChild( $newNode, $oldNode )">
	Replaces the <i>$oldNode</i> with the <i>$newNode</i>. The
	<i>$oldNode</i>	will be unbound from the Node. This function 
    differs from the DOM L2 specification, in the case, if the new
    node is not part of the document, the node will be imported 
    first.
</method>

<method name="appendChild"
	synopsis="$childnode = $node->appendChild( $childnode )">
	The function will add the <i>$childnode</i> to the end of
	<i>$node</i>'s children. The function should fail, if the new
	childnode is allready a child of <i>$node</i>. This function 
    differs from the DOM L2 specification, in the case, if the new
    node is not part of the document, the node will be imported 
    first.
</method>

<method name="cloneNode" 
	synopsis="$newnode =$node->cloneNode( $deep )">
	<b>cloneNode</b> creates a copy of <i>$node</i>. Wether $deep
	is set to 1 (true) the function will copy all childnodes as
	well. If $deep is 0 only the current node will be copied.
</method>

<method name="getParentNode" synopsis="$parentnode = $node->getParentNode();">
	Returns simply the Parent Node of the current node. 
</method>

<method name="parentNode" synopsis="$parentnode = $node->parentNode;">
   Alias for <b>getParentNode()</b>
</method>

<method name="getNextSibling" 
	synopsis="$nextnode = $node->getNextSibling()">
	Returns the next sibling if any .
</method>

<method name="nextSibling" 	synopsis="$nextnode = $node->nextSibling()">
   Alias for <b>getNextSibling()</b>
</method>

<method name="getPreviousSibling" 
	synopsis="$nextnode = $node->getPreviousSibling()">
	Analogous to <b>getNextSibling</b> the function returns the previous
	sibling if any.
</method>

<method name="previousSibling" 	synopsis="$prevnode = $node->previousSibling()">
   Alias for <b>getPreviousSibling()</b>
</method>

<method name="hasChildNodes"
    synopsis="$boolean = $node->hasChildNodes();"> 
    If the current node has Childnodes this function returns TRUE (1),
    otherwise it returns FALSE (0, not undef).
</method>

<method name="getFirstChild" synopsis="$childnode = $node->getFirstChild()">
	If a node has childnodes this function will return the first
	node in the childlist. 
</method>

<method name="firstChild" 	synopsis="$childnode = $node->firstChild;">
   Alias for <b>getFirstChild()</b>
</method>


<method name="getLastChild" synopsis="$childnode = $node->getLastChild()">
	If the <i>$node</i> has childnodes this function returns the
	last child node. 
</method>

<method name="lastChild" synopsis="$childnode = $node->lastChild;">
   Alias for <b>getLastChild()</b>
</method>

<method name="getOwnerDocument" synopsis="$dom = $node->getOwnerDocument()">
	Through this function it is allway possible to access the
	document the current node is bound to.
</method>


<method name="ownerDocument" synopsis="$documentnode = $node->ownerDocument;">
   Alias for <b>getOwnerDocument()</b>
</method>

<method name="getOwner" synopsis="$node = $node->getOwner;">
   This function returns the node the current node is associated
   with. In the very most cases this will be a document node or a
   document fragment node.
</method>

<method name="setOwnerDocument" 
    synopsis="$node->setOwnerDocument( $dom );">
	This function binds a node to another DOM. This method unbinds the
	node first, if it is allready bound to another document.
</method>

<method name="insertBefore" 
    synopsis="$node->insertBefore( $newNode, $refNode )"> 
    The method inserts <i>$newNode</i> before <i>$refNode</i>. If
    <i>$refNode</i> is undefined, the newNode will be set as the new
    first child of the parent node.  This function differs from the
    DOM L2 specification, in the case, if the new node is not part of
    the document, the node will be imported first.
</method>

<method name="insertAfter" synopsis="$node->insertAfter( $newNode, $refNode )">
    The method inserts <i>$newNode</i> after <i>$refNode</i>. If
    <i>$refNode</i> is undefined, the newNode will be set as the new
    last child of the parent node.
</method>

<method name="findnodes" 
    synopsis="@nodes = $node->findnodes( $xpath_statement );">
	<b>findnodes</b> performs the xpath statement on the current node and 
	returns the result as an array. 
</method>

<method name="getChildnodes" synopsis="@children = $node->getChildnodes();">
	<b>getChildnodes</b> implements a more intuitive interface to the
	childnodes of the current node. It enables you to pass all
	children directly to a <i>map</i> or <i>grep</i>. If this function is 
    called in scalar context, the number of childnodes will be returned.
</method>

<method name="childNodes" synopsis="@childnodes = $node->childNodes;">
   Alias for <b>getChildnodes()</b>
</method>

<method name="toString" synopsis="$xmlstring = $node->toString();">
	This is the equivalent to <i>XML::LibXML::Document::toString</i> for
	a single node. This means a node and all its childnodes will be dumped 
	into the result string. 

	There is no formating implemented yet, which may cause an unreadable 
	output.
</method>

<method name="getLocalName" 
    synopsis="$name = $node->getLocalName();">
    Returns the local name of a tag. This is the part behind the colon.
</method>

<method name="localname" synopsis="$localname = $node->localname;">
   Alias for <b>getLocalName()</b>
</method>

<method name="getPrefix" 
    synopsis="$name = $node->getPrefix();">
    Returns the prefix of a tag. This is the part before the colon.
</method>

<method name="prefix" synopsis="$nameprefix = $node->prefix;">
   Alias for <b>getPrefix()</b>
</method>

<method name="getNamespaceURI" synopsis="$uri = $node->getNamespaceURI()">
    returns the URI of the current namespace.
</method>


<method name="hasAttributes" synopsis="$boolean = $node->hasAttributes();">
   returns 1 (TRUE) if the current node has any attributes set, otherwise
   0 (FALSE) is returned.
</method>


<method name="getAttributes" synopsis="@attributelist = $node->getAttributes;">
   returns all attribute nodes of the current node. 
</method>

<method name="attributes" synopsis="@attributelist = $node->attributes;">
   Alias for <b>getAttributes()</b>
</method>


<method name="getAttributesNS" 
    synopsis="@attributelist = $node->attributesNS( $URI );">
   returns all attributes for the given namespace.
</method>


<method name="iterator" synopsis="$node->iterator( \&amp;nodehandler );">
   This is little helper function, that lets one define a function, that
   will be processed on the current node and all its children. The function
   will recieve as its only parameter the node to proceed. The function uses
   inorder proceeding to traverse the subtree. Therefore you can't reach the 
   childnodes anymore, if the nodehandler removes childnodes. 

<example>
   $node->iterator( sub { print $_[0]->nodeName(), "\n"; } );    
</example>

   The example will print all node names in the current subtree.

   The <b>iterator</b> function will return the return value of the
   nodehandler while processing the last child of the current node.
</method>

</description>
<also>
  <item name="XML::LibXML"/>
  <item name="XML::LibXML::Element"/>
  <item name="XML::LibXML::Text"/>
  <item name="XML::LibXML::Comment"/>
  <item name="XML::LibXML::Attr"/>
  <item name="XML::LibXML::DocumentFragment"/>
</also>
<version>0.95</version>
</class>

<class name="XML::LibXML::Element">
<short>The DOM Element Class</short>
<description>

<method name="new" synopsis="$node = XML::LibXML::Element->new( $name )">
	This function creates a new node unbound to any DOM.
</method>

<method name="setAttribute" synopsis="$node->setAttribute( $aname, $avalue );">
	This method sets or replaces the node's attribute
	<i>$aname</i> to the value <i>$avalue</i>
</method>

<method name="setAttributeNS" synopsis="$node->setAttributeNS( $nsURI, $aname, $avalue );">
	Namespaceversion of <i>setAttribute</i>.
</method>

<method name="getAttribute" 
    synopsis="$avalue = $node->getAttribute( $aname );">
	If <i>$node</i> has an attribute with the name <i>$aname</i>,
	the value of this attribute will get returned.
</method>

<method name="getAttributeNS" synopsis="$avalue = $node->setAttributeNS( $nsURI, $aname );">
	Namespaceversion of <i>getAttribute</i>.
</method>

<method name="getAttributeNode"
    synopsis="$attrnode = $node->getAttributeNode( $aname );">

    Returns the attribute as a node if the attribute exists. If the
    Attribute does not exists <i>undef</i> will be returned. 
</method>

<method name="getAttributeNodeNS"
    synopsis="$attrnode = $node->getAttributeNodeNS( $namespaceURI, $aname );">
    Namespaceversion of <i>getAttributeNode</i>. 
</method>

<method name="removeAttribute" synopsis="$node->removeAttribute( $aname );">
	The method removes the attribute <i>$aname</i> from the node's
	attribute list, if the attribute can be found.
</method>

<method name="removeAttributeNS" synopsis="$node->removeAttributeNS( $nsURI, $aname );">
    Namespace version of <i>removeAttribute</i>
</method>

<method name="hasAttribute" synopsis="$boolean = $node->hasAttribute( $aname );">
    This funcion tests if the named attribute is set for the node. If
    the attribute is specified, TRUE (1) will be returned, otherwise
    the returnvalue is FALSE (0).
</method>

<method name="hasAttributeNS" synopsis="$boolean = $node->hasAttributeNS( $nsURI, $aname );">
    namespace version of <i>hasAttribute</i>
</method>

<method name="getElementsByTagName" 
    synopsis="@nodes = $node->getElementsByTagName($tagname);">
	The function gives direct access to all childnodes of the current
	node with the same tagname. It makes things a lot easier if you
	need to handle big datasets.

    If this function is called in SCALAR context, it returns the number of 
    Elements found.
</method>

<method name="getElementsByTagNameNS" 
    synopsis="@nodes = $node->getElementsByTagNameNS($nsURI,$tagname);">
    Namespace version of <i>getElementsByTagName</i>.

    If this function is called in SCALAR context, it returns the number of 
    Elements found.
</method>

<method name="appendWellBalancedChunk" 
	synopsis="$node->appendWellBalancedChunk( $chunk )">
	Sometimes it is nessecary to append a string coded XML Tree to 
	a node. <b>appendWellBalancedChunk</b> will do the trick for you.
	But this is only done if the String is <i>well-balanced</i>. 
</method>

<method name="appendText" 
    synopsis="$node->appendText( $PCDATA );">
    alias for appendTextNode().
</method>

<method name="appendTextNode" synopsis="$node->appendTextNode( $PCDATA );">
    This wrapper function lets you add a string directly to an element
    node.
</method>

<method name="appendTextChild" 
    synopsis="$node->appendTextChild( $childname , $PCDATA )">
    Somewhat similar with <i>appendTextNode</i>: It lets you set an
    Element, that contains only a <i>text node</i> directly by
    specifying the name and the text content.
</method>

</description>
<also>
  <item name="XML::LibXML"/>
  <item name="XML::LibXML::Node"/>
  <item name="XML::LibXML::Document"/>
  <item name="XML::LibXML::Attr"/>
  <item name="XML::LibXML::Text"/>
  <item name="XML::LibXML::Comment"/>
  <item name="XML::LibXML::DocumentFragment"/>
</also>
<version>0.95</version>
</class>

<class name="XML::LibXML::Text">
<short>The DOM Text Node Class</short>
<description>


<method name="new" synopsis="$node = XML::LibXML::Text->new( $content ) ">
	The constuctor of the class. It creates an unbound text node.
</method>


<method name="setData" synopsis="$node->setData( $text_content );">
	This function sets or replaces text content to a node. The
	node has to be of the type "text", "cdata" (not supported yet)
	or "comment".
</method>

</description>
<also>
  <item name="XML::LibXML"/>
  <item name="XML::LibXML::Node"/>
  <item name="XML::LibXML::Element"/>
  <item name="XML::LibXML::Document"/>
  <item name="XML::LibXML::Comment"/>
  <item name="XML::LibXML::DocumentFragment"/>
</also>
<version>0.95</version>
</class>

<class name="XML::LibXML::Comment">
<short>The DOM Comment Class</short>
<description>
	This class provides all functions of <b>XML::LibXML::Text</b>,
	but for comment nodes. This can be done, since only the output
	of the nodetypes is different, but not the datastructure. :-)

<method name="new" synopsis="$node = XML::LibXML::Comment( $content );">
	The constructor is the only provided function for this
	package. It is required, because <b>libxml2</b> treats text
	nodes and comment nodes slightly different.
</method>

</description>
<also>
  <item name="XML::LibXML"/>
  <item name="XML::LibXML::Node"/>
  <item name="XML::LibXML::Element"/>
  <item name="XML::LibXML::Text"/>
  <item name="XML::LibXML::Document"/>
  <item name="XML::LibXML::DocumentFragment"/>
</also>
<version>0.95</version>
</class>


<class name="XML::LibXML::CDATASection">
<short>The DOM CDATASection Class</short>
<description>
	This class provides all functions of <b>XML::LibXML::Text</b>,
	but for CDATA nodes.

<method name="new" synopsis="$node = XML::LibXML::Comment( $content );">
	The constructor is the only provided function for this
	package. It is required, because <b>libxml2</b> treats the
	different textnode types slightly different.
</method>

</description>
<also>
  <item name="XML::LibXML"/>
  <item name="XML::LibXML::Node"/>
  <item name="XML::LibXML::Element"/>
  <item name="XML::LibXML::Text"/>
  <item name="XML::LibXML::Document"/>
  <item name="XML::LibXML::DocumentFragment"/>
</also>
<version>0.95</version>
</class>

<class name="XML::LibXML::Attr">
<short>The DOM Attribute Class</short>
<description>
    This is the interface to handle Attributes like ordinary
    nodes. The naming of the class relies on the W3C DOM
    documentation.

<method name="new" synopsis="$attr = XML::LibXML::Attr->new($name [,$value]);">
    Class constructor. If you need to work with iso encoded strings,
    you should <b>allways</b> use the <i>createAttrbute</i> of
    <b>XML::LibXML::Document</b>.
</method>

<method name="getValue" synopsis="$string = $attr->getValue();">
    Returns the value stored for the attribute. If undef is returned,
    the attribute has no value, which is different of being <i>not
    specified</i>.
</method>


<method name="value" synopsis="$value = $attr->value;">
   Alias for <b>getValue()</b>
</method>


<method name="setValue" synopsis="$attr->setValue( $string );">
    This is needed to set a new attributevalue. If iso encoded strings
    are passed as parameter, the node has to be bound to a document,
    otherwise the encoding might be wrong done.
</method>

<method name="getOwnerElement" synopsis="$node = $attr->getOwnerDocument();">
    returns the node the attribute belongs to. If the attribute is not
    bound to a node, undef will be returned. Overwriting the underlaying
    implementation, the <b>parentNode</b> function will return undef, instead
    of the owner element.
</method>

</description>
<also>
  <item name="XML::LibXML"/>
  <item name="XML::LibXML::Node"/>
  <item name="XML::LibXML::Element"/>
  <item name="XML::LibXML::Document"/>
  <item name="XML::LibXML::DocumentFragment"/>
</also>
<version>0.95</version>
</class>

<class name="XML::LibXML::DocumentFragment">
<short>DOM L2 Implementation of a Document Fragment</short>
<description>
This class is a helper class as described in the DOM Level 2 Specification.
It is implamented as a node without name. All adding, inserting or replacing
functions are aware about document fragments now. 

As well <b>all</b> unbound nodes (all nodes that does not belong to any 
document subtree) are implicit member of document fragments.
</description>
<also>
  <item name="XML::LibXML"/>
  <item name="XML::LibXML::Node"/>
  <item name="XML::LibXML::Element"/>
  <item name="XML::LibXML::Document"/>
  <item name="XML::LibXML::Text"/>
  <item name="XML::LibXML::Comment"/>
  <item name="XML::LibXML::CDATASection"/>
</also>
<version>0.95</version>
</class>
</module>
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.