obspy.core.util.xmlwrapper.XMLParser.xpath

XMLParser.xpath(xpath, xml_doc=None, namespace=None)[source]

Very limited XPath-like query.

Note

This method does not support the full XPath syntax!

Parameters:
  • xpath (str) XPath string, e.g. */event.
  • xml_doc (Element or ElementTree, optional) XML document to query. Defaults to parsed XML document.
  • namespace (str, optional) Namespace used by query. Defaults to document-wide namespace set at root.
Returns:

List of elements.

This Page