Here is a sample of some XML code I have:
<VAST version="2.0">
<Ad id="602678">
<InLine>
<AdSystem>Acudeo Compatible</AdSystem>
<AdTitle>NonLinear Test Campaign 1</AdTitle>
<Description>NonLinear Test Campaign 1</Description>
<Creatives>
<Creative AdID="602678-NonLinear">
</Creative>
</Creatives>
</InLine>
</Ad>
</VAST>
This XML is served online so I hit a specific URL in order to get this data back. However, in some cases, nothing is returned so I am looking for a way to verify whether or not the "Creatives" node is present in whatever is returned at any given time. I have tried BeautifulSoup with no luck but I think that is more for HTML rather than XML. Any help is greatly appreciated, thanks.
if "<Creatives>" in your_returned_payload: ...