Converts an Magnitude into etree.Element object.
Return type: | etree.Element |
---|
Example
>>> from obspy.core.quakeml import Pickler
>>> from obspy.core.event import Magnitude
>>> from obspy.core.util import tostring
>>> magnitude = Magnitude()
>>> magnitude.mag = 3.2
>>> el = Pickler()._magnitude(magnitude)
>>> print(tostring(el))
<?xml version='1.0' encoding='utf-8'?>
<magnitude ...<mag><value>3.2</value></mag>...</magnitude>