Jul-18-2020, 04:43 AM
I would note the following: 1) OP tries to parse xml file and assume that if
<wp:post_date>
is in x
, then x
should contain some data. x
is a string and might include just <wp:post_date>
tag. I would recommend to use xml-parser instead; (the same is true for title
tag) 2) It is recommended to open files using with
keyword.