home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / perl / Attr.pod < prev    next >
Encoding:
Text File  |  2003-08-22  |  1.9 KB  |  109 lines

  1. =head1 NAME
  2.  
  3. XML::LibXML::Attr - XML::LibXML Attribute Class
  4.  
  5. =head1 SYNOPSIS
  6.  
  7.   $attr = XML::LibXML::Attr->new($name [,$value]);
  8.   $string = $attr->getValue();
  9.   $value = $attr->value;
  10.   $attr->setValue( $string );
  11.   $node = $attr->getOwnerElement();
  12.   $attr->setNamespace($nsURI, $prefix);
  13.  
  14.  
  15. =head1 DESCRIPTION
  16.  
  17. This is the interface to handle Attributes like ordinary nodes. The naming of
  18. the class relies on the W3C DOM documentation.
  19.  
  20. =over 4
  21.  
  22. =item B<new>
  23.  
  24.   $attr = XML::LibXML::Attr->new($name [,$value]);
  25.  
  26. Class constructor. If you need to work with iso encoded strings, you should
  27. allways use the createAttrbute of XML::LibXML::Document.
  28.  
  29.  
  30. =item B<getValue>
  31.  
  32.   $string = $attr->getValue();
  33.  
  34. Returns the value stored for the attribute. If undef is returned, the attribute
  35. has no value, which is different of being not specified.
  36.  
  37.  
  38.  
  39. =back
  40.  
  41. =over 4
  42.  
  43. =item B<value>
  44.  
  45.   $value = $attr->value;
  46.  
  47. Alias for getValue()
  48.  
  49.  
  50.  
  51. =back
  52.  
  53. =over 4
  54.  
  55. =item B<setValue>
  56.  
  57.   $attr->setValue( $string );
  58.  
  59. This is needed to set a new attributevalue. If iso encoded strings are passed
  60. as parameter, the node has to be bound to a document, otherwise the encoding
  61. might be wrong done.
  62.  
  63.  
  64.  
  65. =back
  66.  
  67. =over 4
  68.  
  69. =item B<getOwnerElement>
  70.  
  71.   $node = $attr->getOwnerElement();
  72.  
  73. returns the node the attribute belongs to. If the attribute is not bound to a
  74. node, undef will be returned. Overwriting the underlaying implementation, the
  75. parentNode function will return undef, instead of the owner element.
  76.  
  77.  
  78.  
  79. =back
  80.  
  81. =over 4
  82.  
  83. =item B<setNamespace>
  84.  
  85.   $attr->setNamespace($nsURI, $prefix);
  86.  
  87. This function activates a namespace for the given attribute. If the attribute
  88. was not previously declared in the context of the attribute this function will
  89. be silently ignored. In this case you may wish to call setNamespace() on the
  90. ownerElement.
  91.  
  92.  
  93.  
  94. =back
  95.  
  96. =head1 AUTHORS
  97.  
  98. Matt Sergeant, 
  99. Christian Glahn, 
  100. =head1 VERSION
  101.  
  102. 1.56
  103.  
  104. =head1 COPYRIGHT
  105.  
  106. 2001-2002, AxKit.com Ltd; 2001-2003 Christian Glahn, All rights reserved.
  107.  
  108. =cut
  109.