I am using xml.etree in python to generate an xml document, now while I am generating the xml document I want to get the xpath of a element that I have created, is there anyway of getting the absolute path while still creating the Element?
Below is an example of the generation process:
ParameterDeclaration = Element("ParameterDeclarations")
Parameter = Element("ParameterDeclaration")
Parameter.set("name", "Speed")
Parameter.set("value", action.speed)
Parameter.set("parameterType", "double")
ParameterDeclaration.append(Parameter)
Can I get the path of the Parameter element right after that last line?
Please note that this is only a small section of the xml file, the ParameterDeclaration is being appended to another element.