class_docstr: Geocoder using the IGN France GeoCoder OpenLS API.
  
  Documentation at:
      https://geoservices.ign.fr/services-web-essentiels
class_docstr_tok: ["Geocoder","using","the","IGN","France","GeoCoder","OpenLS","API",".","Documentation","at",":","https",":","\/\/geoservices.ign.fr\/services-web-essentiels"]
docstr: Returns location, (latitude, longitude) from XML feed
  and transform to json
docstr_tok: ["Returns","location",",","(","latitude",",","longitude",")","from","XML","feed","and","transform","to","json"]
code: def _parse_xml(
      self, page, is_reverse=False, is_freeform=False, exactly_one=True
  ):
      """
      Returns location, (latitude, longitude) from XML feed
      and transform to json
      """
      # Parse the page
      tree = ET.fromstring(page.encode("utf-8"))
  
      # Clean tree from namespace to facilitate XML manipulation
      def remove_namespace(doc, namespace):
          """Remove namespace in the document in place."""
          ns = "{%s}" % namespace
          nsl = len(ns)
          for elem in doc.iter():
              if elem.tag.startswith(ns):
                  elem.tag = elem.tag[nsl:]
  
      remove_namespace(tree, "http://www.opengis.net/gml")
      remove_namespace(tree, "http://www.opengis.net/xls")
      remove_namespace(tree, "http://www.opengis.net/xlsext")
  
      # Return places as json instead of XML
      places = self._xml_to_json_places(tree, is_reverse=is_reverse)
  
      if not places:
          return None
      if exactly_one:
          return self._parse_place(places[0], is_freeform=is_freeform)
      else:
          return [
              self._parse_place(place, is_freeform=is_freeform)
              for place in places
          ]
  
file_path: geopy/geopy/geocoders/ignfrance.py
imports: import warnings
  import xml.etree.ElementTree
  from functools import partial
  from urllib.parse import urlencode
  from geopy.exc import GeocoderQueryError
  from geopy.geocoders.base import DEFAULT_SENTINEL, Geocoder
  from geopy.location import Location
  from geopy.util import logger
label_desc: Use image node_id 4 for calling the IGNFrance obj's underlying member method code with example usage: obj._parse_xml(page, is_reverse, is_freeform, exactly_one) and returns: None, self, unknown