def xml_add_meta(data):
 xml = ''
 meta = []
 if data.get(config.META):
  ordered_meta = OrderedDict(sorted(data[config.META].items()))
  for (name, value) in ordered_meta.items():
   meta.append(('<%s>%d</%s>' % (name, value, name)))
 if meta:
  xml = ('<%s>%s</%s>' % (config.META, ''.join(meta), config.META))
 return xml

def xml_add_meta ( data ) : xml = '' meta = [ ] if data . get ( config . META ) : ordered_meta = OrderedDict ( sorted ( data [ config . META ] . items ( ) ) ) for ( name , value ) in ordered_meta . items ( ) : meta . append ( ( '<%s>%d</%s>' % ( name , value , name ) ) ) if meta : xml = ( '<%s>%s</%s>' % ( config . META , '' . join ( meta ) , config . META ) ) return xml
returns a meta node with page .