geonature.core.gn_meta.mtd.xml_parser

Module Contents

Functions

get_tag_content(parent, tag_name[, default_value])

Return the content of a xml tag

parse_actors_xml(actors)

Parse the parameters of the Actor provided as an XML node in the input variable "actors"

parse_acquisition_framwork_xml(xml)

Parse an xml of AF from a string

parse_acquisition_framework(ca)

parse_jdd_xml(xml)

Parse an xml of datasets from a string

Attributes

namespace

_xml_parser

geonature.core.gn_meta.mtd.xml_parser.namespace[source]
geonature.core.gn_meta.mtd.xml_parser._xml_parser[source]
geonature.core.gn_meta.mtd.xml_parser.get_tag_content(parent, tag_name, default_value=None)[source]

Return the content of a xml tag Check if the node exist or return a default value Params:

parent (etree Element): the parent where find the tag tag_name (str): the name of the tag default_value (any): the default value f the tag doesn’t exist

Return

any: the tag content or the default value

geonature.core.gn_meta.mtd.xml_parser.parse_actors_xml(actors)[source]

Parse the parameters of the Actor provided as an XML node in the input variable « actors » Param:

actors (etree Element): Node of an actor type containing from one to multiple actors

Returns:

dict: A dictionnary of the actors informations

geonature.core.gn_meta.mtd.xml_parser.parse_acquisition_framwork_xml(xml)[source]

Parse an xml of AF from a string Return:

dict: a dict of the parsed xml

geonature.core.gn_meta.mtd.xml_parser.parse_acquisition_framework(ca)[source]
geonature.core.gn_meta.mtd.xml_parser.parse_jdd_xml(xml)[source]

Parse an xml of datasets from a string Return:

list: a list of dict of the JDD in the xml