Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def to_string(self, prettyprint=True):
""" Return the KML Object as serialized xml """
if config.LXML and prettyprint:
return etree.tostring(
self.etree_element(),
encoding='utf-8',
pretty_print=True).decode('UTF-8')
else:
return etree.tostring(
self.etree_element(),
encoding='utf-8').decode('UTF-8')
return
linearring = element.find('%sLinearRing' % self.ns)
if linearring is not None:
geom = Geometry(ns=self.ns)
geom.from_element(linearring)
self._geometry = geom
return
multigeometry = element.find('%sMultiGeometry' % self.ns)
if multigeometry is not None:
geom = Geometry(ns=self.ns)
geom.from_element(multigeometry)
self._geometry = geom
return
logger.warn('No geometries found')
logger.debug(u'Problem with element: {}'.format(etree.tostring(element)))
#raise ValueError('No geometries found')
def to_string(self, prettyprint=True):
""" Return the ATOM Object as serialized xml """
if LXML and prettyprint:
return etree.tostring(
self.etree_element(),
encoding='utf-8',
pretty_print=True).decode('UTF-8')
else:
return etree.tostring(
self.etree_element(),
encoding='utf-8').decode('UTF-8')
def to_string(self, prettyprint=True):
""" Return the KML Object as serialized xml """
if config.LXML and prettyprint:
return etree.tostring(
self.etree_element(),
encoding='utf-8',
pretty_print=True).decode('UTF-8')
else:
return etree.tostring(
self.etree_element(),
encoding='utf-8').decode('UTF-8')
def to_string(self, prettyprint=True):
""" Return the ATOM Object as serialized xml """
if LXML and prettyprint:
return etree.tostring(
self.etree_element(),
encoding='utf-8',
pretty_print=True).decode('UTF-8')
else:
return etree.tostring(
self.etree_element(),
encoding='utf-8').decode('UTF-8')
def to_string(self, prettyprint=False):
""" Return the KML Object as serialized xml """
if config.LXML and prettyprint:
return etree.tostring(
self.etree_element(),
encoding='utf-8',
pretty_print=True).decode('UTF-8')
else:
return etree.tostring(
self.etree_element(),
encoding='utf-8').decode('UTF-8')
def to_string(self, prettyprint=False):
""" Return the KML Object as serialized xml """
if config.LXML and prettyprint:
return etree.tostring(
self.etree_element(),
encoding='utf-8',
pretty_print=True).decode('UTF-8')
else:
return etree.tostring(
self.etree_element(),
encoding='utf-8').decode('UTF-8')