0
votes
0answers
6 views

Parsing multiple same formatted xml items [migrated]

I have multiple items within my xml code I want to parse. I'm not quite sure of how to do it, any help would be greatly appreciated. Below is a snippet of my xml and python code and what I'm looking ...
2
votes
1answer
35 views

Parsing XML with double nested tags using mindom

I want to retrieve id and name per skill. It works but is it well done? I would like to stay with minidom but all advices will be appreciated. # This is only part of XML that interesting me: # ...
4
votes
2answers
63 views

Recursive XML2JSON parser

I made a Python function that takes an XML file as a parameter and returns a JSON. My goal is to convert some XML get from an old API to convert into Restful API. This function works, but it is ...
1
vote
0answers
24 views

DOMDocument field class Python

What do you think of this class? Is this simple to understand how it works and what it does? Do you think it is good piece of code? class Field(object): """Class which contains logic of ...
1
vote
2answers
391 views

Help fix up my Python XML Schema parsing code

I've been working on a lightweight xml schema parser, and have what I think is a moderately clean solution (some parts helped out by previous questions I posted here) so far for obtaining all schema ...
3
votes
1answer
343 views

Convert elementtree to dict

Just needed a quick way to convert an elementtree element to a dict. I don't care if attributes/elements clash in name, nor namespaces. The XML files are small enough. If an element has multiple ...
0
votes
1answer
113 views

Python xml schema parsing for simpleContent and simpleTypes

I am writing a few python functions to parse through an xml schema for reuse later to check and create xml docs in this same pattern. Below are two functions I wrote to parse out data from ...
4
votes
2answers
2k views

Better way to parse XML in Python

I'm sure there must be a better / simpler way of doing this.... The aim of this code is to return an object which contains all of the movies. Where attributes are not found, they need to return ...
2
votes
1answer
214 views

clean up python file moving script based on xml elements

I wrote a script that is automating the archiving of specific files based on given parameters. The script is crashing on files that are over 500 MB when searching by "special id" or "date", values ...
1
vote
1answer
2k views

Python XML parsing and data presentation in Django

I hope this is not a duplicate. For some time now, I've been using a pattern which I think could be done more elegantly. I have a lot of XML files that need to be represented in a Django views. My ...
2
votes
1answer
2k views

Python xml schema parsing and xml creation from flat files - code review

I am new to python and had to create a schema parser to pull information on attributes and complex types, etc. and then convert data from flat files into the proper xml format. We are processing a lot ...
2
votes
3answers
122 views

XML-tag function

I'm an experienced programmer, but just a beginner in Python, and would like some input on a small function that's working but which I'm not very happy with. It's used to produce XML tags (strings). ...
2
votes
1answer
2k views

Parsing huge xml file with lxml.etree.iterparse in python

After solving the error in SO (like suggested) I return now for codereview. :-) The task is to parse a huge file dblp.xml (~800 MB) presented by DBLP. The records in this huge file do look for ...