obspy.io.quakeml.core.Unpickler._origin

Unpickler._origin(element, arrivals)[source]

Converts an etree.Element into an Origin object.

Return type:Origin

Example

>>> from lxml import etree
>>> XML = b'''<?xml version="1.0" encoding="UTF-8"?>
... <origin>
...   <latitude><value>34.23</value></latitude>
... </origin>'''
>>> xml_doc = etree.fromstring(XML)
>>> unpickler = Unpickler(xml_doc)
>>> origin = unpickler._origin(xml_doc, arrivals=[])
>>> print(origin.latitude)
34.23