Hi,
thanks for your help.
i solved the situation like this:
img = props.find('images')
photos = []
for child in img[:len(img)]:
photos.append(child[0].text)
Hi Issuer,
Plz select options :
1. Follow someone else convert xml to dict, and then process forward.
2. See this document python DOM XML doc, especial in 20.6.2.3 section
https://docs.python.org/3.6/library/xml.dom.html#domimplementation-objects
see nodelist.item(i) and __getitem__() method.
On
Thanks for your feedback.
The problem is if i set all the urls to None before, and a property have
only 6 images of 20, on database saves the 6 images of this property and
saves also the other image columns with images from a different property,
but when i use the else blocks instead of setting
The image urls are being set to None on every iteration where the id
doesn't match. Try setting all of the urls to None before the loop, then
remove the else blocks.
On Thursday, October 24, 2019 at 11:28:00 AM UTC-4, Nuno Vieira wrote:
>
> Hi,
>
> i receive an xml file and i am parsing the valu
Would something like XMLTODICT help?
https://pypi.org/project/xmltodict/
import xmltodict # Third Party
data = ""
parsed_data =xmltodict.parse(data)
# do your data thing here...
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubsc
5 matches
Mail list logo