I'm a newbie in Python. I would like create a python script which checks(maybe parsing) every commited xml-file for the availablity of a special tag (e.g. status="Needs Review"). If the xml-file consists of this tag then send an email with a link to the topic. If not continue commit without sending any email.
Does anybody have a code sample how to realize this as a python script. xml-file-sample:
<topic template="Default" status="Needs Review" lasteditedby="user1">
<title translate="true">Sample Title</title>
<body>
<header>
<para styleclass="Heading1"><text styleclass="Heading1" translate="true">Statistische Messungen</text></para>
</header>
<para styleclass="Normal"><text styleclass="Font Style" style="font-family:'Optima LT'; font-size:10pt; font-weight:normal; font-style:normal; text-decoration:none; text-transform:none; vertical-align:baseline; color:#000000; background-color:transparent; letter-spacing:normal; letter-scaling:100%;" translate="true">This is a sample Text</text></para>
</body>
</topic>
I guess there are different ways to do this and I know there some python codings for post-commits, but I can't find codings for this issue.