0

I was to obtain the node of the tag:

<helloworld>
...
</helloworld>

How do i use the .find() operation provided by the The ElementTree XML API if i only know half the tag characters?

In more detail i want .find("(*)world") and obtain the node of the helloworld tag

Radaeld
  • 175
  • 1
  • 2
  • 9
  • Is the example *really* something like `helloworld`, or is it something like `foo:world`? – Charles Duffy Feb 20 '19 at 21:25
  • it's just an example. The point is i want to mach with half the tag and get the node – Radaeld Feb 20 '19 at 21:26
  • Yes, but whether the division between the two halves is the namespace boundary is a critical detail (being a very common scenario, and thus a question we have good answers to already). If you're asking a more general question than you need, you'll get more general answers, which potentially also means answers that perform a lot worse. – Charles Duffy Feb 20 '19 at 21:27
  • not using namespaces – Radaeld Feb 20 '19 at 21:29
  • Relevant [parse the structure of the main item node without previously knowing its structure](https://stackoverflow.com/a/53896422/7414759) – stovfl Feb 21 '19 at 12:49

0 Answers0