I'm trying to parse a ODF-document with xml.dom.minidom. I would like to get all elements that are text:p OR text:h. Seems like there would be a way to add a wildcard in the getElementsByTagName method. Or is it?
Is there a better way to parse a odf-document without uno?
As getElementsByTagName returns a DOMElement list you could just simply concatenate the two lists.
Alternatively XPath supports and/or operators, so you could use that. That would require using the elementTree or lxml modules instead.
Wildcards in getElementsByTagName (xml.dom.minidom)