I\'m a programming novice and only rarely use python so please bear with me as I try to explain what I am trying to do :)
I have the following XML:
&
You could use a CssSelector to get the nodes you want from the Patient element:
from lxml.cssselect import CSSSelector
visitSelector = CSSSelector('Visit')
visits = visitSelector(child)
you can do the same to get the patientCode Tag and the SWOL28 tag
then you can access and modifiy the text of the elements using element.text