I am a newbie to Python. I have an XML file in the server which will be updated by a device with notifications periodically like below.
<notifications
xmlns="http://XXXXX">
<notification>
<received>2016-09-04T13:48:57Z</received>
<source-address>x.x.x.x</source-address>
<notification-type>type-1</notification-type>
<message>message-1</message>
</notification>
<notification>
<received>2016-09-04T13:49:21Z</received>
<source-address>X.X.X.X</source-address>
<notification-type>type-2</notification-type>
<message>message-2</message>
</notification>
<notification>
<received>2016-09-04T13:52:38Z</received>
<source-address>X.X.X.X</source-address>
<notification-type>type-3</notification-type>
<message>message-3</message>
</notification>
<notification>
<received>2016-09-04T14:01:21Z</received>
<source-address>X.X.X.X</source-address>
<notification-type>type-4</notification-type>
<message>message-4</message>
</notification>
<notification>
<received>2016-09-04T14:01:51Z</received>
<source-address>X.X.X.X</source-address>
<notification-type>type-5</notification-type>
<message>message-5</message>
</notification>
</notifications>
I am interested in getting the values of <notification-type> and <message>
whenever device post notification on to this file. Is there a way I can do this in Python?