azure-servicemanagement-legacy/azure/servicemanagement/_serialization.py
def get_entry_properties_from_node(entry, include_id, id_prefix_to_skip=None, use_title_as_id=False):
        ''' get properties from entry xml '''
        properties = {}

        etag = entry.getAttributeNS(METADATA_NS, 'etag')
        if etag:
            properties['etag'] = etag
        for updated in _MinidomXmlToObject.get_child_nodes(entry, 'updated'):
            properties['updated'] = updated.firstChild.nodeValue
        for name in _MinidomXmlToObject.get_children_from_path(entry, 'author', 'name'):
            if name.firstChild is not None:
                properties['author'] = name.firstChild.nodeValue

        if include_id:
            if use_title_as_id:
                for title in _MinidomXmlToObject.get_child_nodes(entry, 'title'):
                    properties['name'] = title.firstChild.nodeValue
            else:
                # TODO: check if this is used
                for id in _MinidomXmlToObject.get_child_nodes(entry, 'id'):
                    properties['name'] = _get_readable_id(
                        id.firstChild.nodeValue, id_prefix_to_skip)

        return properties
def get_entry_properties_from_node(entry, include_id, id_prefix_to_skip=None, use_title_as_id=False):
        ''' get properties from entry xml '''
        properties = {}

        etag = entry.getAttributeNS(METADATA_NS, 'etag')
        if etag:
            properties['etag'] = etag
        for updated in _MinidomXmlToObject.get_child_nodes(entry, 'updated'):
            properties['updated'] = updated.firstChild.nodeValue
        for name in _MinidomXmlToObject.get_children_from_path(entry, 'author', 'name'):
            if name.firstChild is not None:
                properties['author'] = name.firstChild.nodeValue

        if include_id:
            if use_title_as_id:
                for title in _MinidomXmlToObject.get_child_nodes(entry, 'title'):
                    properties['name'] = title.firstChild.nodeValue
            else:
                # TODO: check if this is used
                for id in _MinidomXmlToObject.get_child_nodes(entry, 'id'):
                    properties['name'] = _get_readable_id(
                        id.firstChild.nodeValue, id_prefix_to_skip)

        return properties
def get_entry_properties_from_node ( entry , include_id , id_prefix_to_skip = None , use_title_as_id = False ) : properties = { } etag = entry . getAttributeNS ( METADATA_NS , 'etag' ) if etag : properties [ 'etag' ] = etag for updated in _MinidomXmlToObject . get_child_nodes ( entry , 'updated' ) : properties [ 'updated' ] = updated . firstChild . nodeValue for name in _MinidomXmlToObject . get_children_from_path ( entry , 'author' , 'name' ) : if name . firstChild is not None : properties [ 'author' ] = name . firstChild . nodeValue if include_id : if use_title_as_id : for title in _MinidomXmlToObject . get_child_nodes ( entry , 'title' ) : properties [ 'name' ] = title . firstChild . nodeValue else : # TODO: check if this is used for id in _MinidomXmlToObject . get_child_nodes ( entry , 'id' ) : properties [ 'name' ] = _get_readable_id ( id . firstChild . nodeValue , id_prefix_to_skip ) return properties
get properties from entry xml
get properties from entry xml