'Return processed and validated server libraries list.
Output: array'

def get_server_children(self):

    libraries_data = self.get_libraries_list(output_format='xml')
    try:
        xml_head = libraries_data.getElementsByTagName('MediaContainer')
    except Exception as e:
        logger.warn((u'PlexPy    Pmsconnect    ::    Unable    to    parse    XML    for    get_libraries_list:    %s.' % e))
        return []
    libraries_list = []
    for a in xml_head:
        if a.getAttribute('size'):
            if (a.getAttribute('size') == '0'):
                logger.debug(u'PlexPy    Pmsconnect    ::    No    libraries    data.')
                libraries_list = {'libraries_count': '0', 'libraries_list': []}
                return libraries_list
        if a.getElementsByTagName('Directory'):
            result_data = a.getElementsByTagName('Directory')
            for result in result_data:
                libraries_output = {'section_id': helpers.get_xml_attr(result, 'key'), 'section_type': helpers.get_xml_attr(result, 'type'), 'section_name': helpers.get_xml_attr(result, 'title'), 'thumb': helpers.get_xml_attr(result, 'thumb'), 'art': helpers.get_xml_attr(result, 'art')}
                libraries_list.append(libraries_output)
    output = {'libraries_count': helpers.get_xml_attr(xml_head[0], 'size'), 'title': helpers.get_xml_attr(xml_head[0], 'title1'), 'libraries_list': libraries_list}
    return output
