Class | Bio::PhyloXML::Uri |
In: |
lib/bio/db/phyloxml/phyloxml_elements.rb
|
Parent: | Object |
A uniform resource identifier. In general, this is expected to be an URL (for example, to link to an image on a website, in which case the ‘type’ attribute might be ‘image’ and ‘desc’ might be ‘image of a California sea hare’)
Converts elements to xml representation. Called by PhyloXML::Writer class.
# File lib/bio/db/phyloxml/phyloxml_elements.rb, line 678 678: def to_xml 679: if @uri != nil 680: xml_node = LibXML::XML::Node.new('uri', @uri) 681: Writer.generate_xml(xml_node, self, [ 682: [:attr, 'desc'], 683: [:attr, 'type']]) 684: return xml_node 685: end 686: end