minznerjosh / vastacular

Parses VAST XML.
MIT License
6 stars 7 forks source link

Tolerate empty <Creative/> tags when decoding from XML. #20

Open roscoemcinerney opened 5 years ago

roscoemcinerney commented 5 years ago

This PR lets pojoFromXML() ignore Creative tags without a type.

For an example seen in the wild: In Google's collection of sample VAST/VPAID tags, the item "Single VPAID 2.0 Linear" wraps a second static tag, which contains one valid creative tag, and one empty one - which causes pojoFromXML() to throw an exception "creativeParsers[type] is not a function", as type is undefined.