title: Extract Data from BNode
body: <p>I'm using a SPARQL to extract a node from an RDF file, the node in the rdf file is as follows:</p>
  
  <pre class="lang-xml prettyprint-override"><code> &lt;dc:description&gt;Birds are a class of vertebrates. They are bipedal, warm-blooded, have a covering of feathers, and their front limbs are modified into wings. Some birds, such as penguins and ostriches, have lost the power of flight. All birds lay eggs. Because birds are warm-blooded, their eggs have to be incubated to keep the embryos inside warm, or they will perish.^M
      &lt;br /&gt;
      &lt;br /&gt;
      &lt;a href="/nature/19700707"&gt;All you need to know about British birds.&lt;/a&gt;
  &lt;/dc:description&gt;
  </code></pre>
  
  <p>I'm using python RDFLib to get this node. It is returning as </p>
  
  <pre><code>rdflib.term.BNode('Nfc3f01b2567a4b3ea23dbd01394929df')
  </code></pre>
  
  <p>How is it possible to extract the text from dc:description <code>rdflib.term.BNode('Nfc3f01b2567a4b3ea23dbd01394929df')</code></p>
  
  <p>Something I tried based on the answers:</p>
  
  <pre><code>from rdflib import *
  import rdfextras
  import json
  
  #load the ontology
  rdfextras.registerplugins()
  g=Graph()
  
  g.parse("http://www.bbc.co.uk/nature/life/Bird.rdf")
  
  
  #define the predixes
  PREFIX = ''' PREFIX dc:&lt;http://purl.org/dc/terms/&gt;
               .......
               PREFIX po:&lt;http://purl.org/ontology/po/&gt;
               PREFIX owl:&lt;http://www.w3.org/2002/07/owl#&gt;
           '''
  
  def exe(query):
          query = PREFIX + query
          return g.query(query)
  
  def getEntity(entity_type,entity):
          #getting the description
          entity_url = "&lt;http://www.bbc.co.uk/nature/life/" + entity.capitalize() + "#" + entity_type.lower() +"&gt;"
      query = ''' SELECT ?description
                      WHERE { ''' + entity_url + ''' dc:description ?description . }'''
      result_set = exe(query)
      dc = Namespace("http://purl.org/dc/terms/")
          for row in result_set:
                  description = row[0]
              print description.value(dc.description)
  
  getEntity("class","bird")
  </code></pre>
  
  <p>I'm getting the following error:</p>
  
  <pre class="lang-none prettyprint-override"><code>Traceback (most recent call last):
    File "test_bird1.py", line 40, in &lt;module&gt;
      getEntity("class","bird")
    File "test_bird1.py", line 38, in getEntity
      print description.value(dc.description)
  AttributeError: 'BNode' object has no attribute 'value'
  </code></pre>