Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8329943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:57:40+00:00 2026-06-09T01:57:40+00:00

The official documentation here just says, match may be a tag name or path,

  • 0

The official documentation here just says, “match may be a tag name or path”, but I don’t see a definition of “path” anywhere. From looking at examples on the web I gather it’s some stripped-down XPath-like notation, but it’s unclear exactly what is allowed — for example, should the path start with a /, a //, or no delimiter at all? Can I specify attributes with [@att = "value"]?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T01:57:42+00:00Added an answer on June 9, 2026 at 1:57 am

    Well, looking at the source code at http://hg.python.org/cpython/file/2.7/Lib/xml/etree/ElementTree.py we find that Element.find is implemented as

    def find(self, path, namespaces=None):
        return ElementPath.find(self, path, namespaces)
    

    ElementPath is implemented as

    try:
        from . import ElementPath
    except ImportError:
        ElementPath = _SimpleElementPath()
    

    _SimpleElementPath only checks tag name:

    # emulate pre-1.2 find/findtext/findall behaviour
    def find(self, element, tag, namespaces=None):
        for elem in element:
            if elem.tag == tag:
                return elem
        return None
    

    So let’s look at ElementPath.py: http://hg.python.org/cpython/file/f98e2944cb40/Lib/xml/etree/ElementPath.py It states,

    # limited xpath support for element trees
    

    So I would assume valid XPath is likely a valid argument for find. I’m not familiar enough with XPath to determine exactly what it supports, but http://effbot.org/zone/element-xpath.htm describes how much it supported five years ago and includes a table of syntax.

    ElementTree provides limited support for XPath expressions. The goal is to support a small subset of the abbreviated syntax; a full XPath engine is outside the scope of the core library.

    http://docs.python.org/dev/library/xml.etree.elementtree.html#xpath-support has a more updated table. It doesn’t look too different.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i've been looking several guidance about this in Grails official documentation site here but
Ok guys I'm little stacked here. According to official documentation Google says that Once
Here is a snippet of the official Apple Documentation of AudioBufferList (Core Audio Data
I have looked in the official documentation for python, but i cannot seem to
Official appengine documentation says that if we set threadsafe property to true in app.yaml
I've spent the last hour searching for an official Google Voice API documentation but
I am following the official Amazon S3 REST API documentation here and am having
Here's a fiddle with a working Bootstrap carousel. http://jsfiddle.net/jeykeu/5TDff/ And here's the official documentation
The official documentation here only lists the minimum required version for a very small
Here's the information according to the official documentation : There are four different pairs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.