def xml_root_open(data):
 links = data.get(config.LINKS)
 href = title = ''
 if (links and ('self' in links)):
  self_ = links.pop('self')
  href = (' href="%s" ' % utils.escape(self_['href']))
  if ('title' in self_):
   title = (' title="%s" ' % self_['title'])
 return ('<resource%s%s>' % (href, title))

def xml_root_open ( data ) : links = data . get ( config . LINKS ) href = title = '' if ( links and ( 'self' in links ) ) : self_ = links . pop ( 'self' ) href = ( ' href="%s" ' % utils . escape ( self_ [ 'href' ] ) ) if ( 'title' in self_ ) : title = ( ' title="%s" ' % self_ [ 'title' ] ) return ( '<resource%s%s>' % ( href , title ) )
returns the opening tag for the xml root node .