You might want to rethink your approach in a fundamental way if you want to create millions of rows of XML.
Define Python classes to contain your actual data. These must be absolutely correct, based on ordinary Python processing. No XSD-based lookup or validation or range checking or anything. Just Python. Your application data must be in Plain Old Python Objects (POPO).
Write a "serializer" that creates XML from your Plain Old Python Objects. Since the Python objects are already absolutely correct, the output XML will be absolutely correct.
Or locate a seraializer. http://coder.cl/products/pyxser/ Django has one.
http://stackoverflow.com/questions/1500575/python-xml-serializers https://stackoverflow.com/questions/1500575/python-xml-serializers
Once you have this infrastructure of Python classes that produce XML in place, then you do the following.
- Rewrite your XSD parser so that it creates your Plain Old Python Object class definitions from the XSD. It's an XSD->Python translator.
Now you do the bulk of your work in Python. Millions of rows in simple Python class definitions is easy. XML is merely serialized Python objects. Since the XSD is not used, this, too, is easy.
Further (and most importantly) you do a one-time-only conversion of XSD to Python.
Look at this Stackoverflow question for a direction to take. http://stackoverflow.com/questions/1072853/convert-xsd-to-python-class https://stackoverflow.com/questions/1072853/convert-xsd-to-python-class
You might want to rethink your approach in a fundamental way if you want to create millions of rows of XML.
Define Python classes to contain your actual data. These must be absolutely correct, based on ordinary Python processing. No XSD-based lookup or validation or range checking or anything. Just Python. Your application data must be in Plain Old Python Objects (POPO).
Write a "serializer" that creates XML from your Plain Old Python Objects. Since the Python objects are already absolutely correct, the output XML will be absolutely correct.
Or locate a seraializer. http://coder.cl/products/pyxser/ Django has one.
http://stackoverflow.com/questions/1500575/python-xml-serializers
Once you have this infrastructure of Python classes that produce XML in place, then you do the following.
- Rewrite your XSD parser so that it creates your Plain Old Python Object class definitions from the XSD. It's an XSD->Python translator.
Now you do the bulk of your work in Python. Millions of rows in simple Python class definitions is easy. XML is merely serialized Python objects. Since the XSD is not used, this, too, is easy.
Further (and most importantly) you do a one-time-only conversion of XSD to Python.
Look at this Stackoverflow question for a direction to take. http://stackoverflow.com/questions/1072853/convert-xsd-to-python-class
You might want to rethink your approach in a fundamental way if you want to create millions of rows of XML.
Define Python classes to contain your actual data. These must be absolutely correct, based on ordinary Python processing. No XSD-based lookup or validation or range checking or anything. Just Python. Your application data must be in Plain Old Python Objects (POPO).
Write a "serializer" that creates XML from your Plain Old Python Objects. Since the Python objects are already absolutely correct, the output XML will be absolutely correct.
Or locate a seraializer. http://coder.cl/products/pyxser/ Django has one.
https://stackoverflow.com/questions/1500575/python-xml-serializers
Once you have this infrastructure of Python classes that produce XML in place, then you do the following.
- Rewrite your XSD parser so that it creates your Plain Old Python Object class definitions from the XSD. It's an XSD->Python translator.
Now you do the bulk of your work in Python. Millions of rows in simple Python class definitions is easy. XML is merely serialized Python objects. Since the XSD is not used, this, too, is easy.
Further (and most importantly) you do a one-time-only conversion of XSD to Python.
Look at this Stackoverflow question for a direction to take. https://stackoverflow.com/questions/1072853/convert-xsd-to-python-class
You might want to rethink your approach in a fundamental way if you want to create millions of rows of XML.
Define Python classes to contain your actual data. These must be absolutely correct, based on ordinary Python processing. No XSD-based lookup or validation or range checking or anything. Just Python. Your application data must be in Plain Old Python Objects (POPO).
Write a "serializer" that creates XML from your Plain Old Python Objects. Since the Python objects are already absolutely correct, the output XML will be absolutely correct.
Or locate a seraializer. http://coder.cl/products/pyxser/ Django has one.
http://stackoverflow.com/questions/1500575/python-xml-serializers
Once you have this infrastructure of Python classes that produce XML in place, then you do the following.
- Rewrite your XSD parser so that it creates your Plain Old Python Object class definitions from the XSD. It's an XSD->Python translator.
Now you do the bulk of your work in Python. Millions of rows in simple Python class definitions is easy. XML is merely serialized Python objects. Since the XSD is not used, this, too, is easy.
Further (and most importantly) you do a one-time-only conversion of XSD to Python.
Look at this Stackoverflow question for a direction to take. http://stackoverflow.com/questions/1072853/convert-xsd-to-python-class
You might want to rethink your approach in a fundamental way if you want to create millions of rows of XML.
Define Python classes to contain your actual data. These must be absolutely correct, based on ordinary Python processing. No XSD-based lookup or validation or range checking or anything. Just Python. Your application data must be in Plain Old Python Objects (POPO).
Write a "serializer" that creates XML from your Plain Old Python Objects. Since the Python objects are already absolutely correct, the output XML will be absolutely correct.
Once you have this infrastructure of Python classes that produce XML in place, then you do the following.
- Rewrite your XSD parser so that it creates your Plain Old Python Object class definitions from the XSD. It's an XSD->Python translator.
Now you do the bulk of your work in Python. Millions of rows in simple Python class definitions is easy. XML is merely serialized Python objects. Since the XSD is not used, this, too, is easy.
Further (and most importantly) you do a one-time-only conversion of XSD to Python.
Look at this Stackoverflow question for a direction to take. http://stackoverflow.com/questions/1072853/convert-xsd-to-python-class
You might want to rethink your approach in a fundamental way if you want to create millions of rows of XML.
Define Python classes to contain your actual data. These must be absolutely correct, based on ordinary Python processing. No XSD-based lookup or validation or range checking or anything. Just Python. Your application data must be in Plain Old Python Objects (POPO).
Write a "serializer" that creates XML from your Plain Old Python Objects. Since the Python objects are already absolutely correct, the output XML will be absolutely correct.
Or locate a seraializer. http://coder.cl/products/pyxser/ Django has one.
http://stackoverflow.com/questions/1500575/python-xml-serializers
Once you have this infrastructure of Python classes that produce XML in place, then you do the following.
- Rewrite your XSD parser so that it creates your Plain Old Python Object class definitions from the XSD. It's an XSD->Python translator.
Now you do the bulk of your work in Python. Millions of rows in simple Python class definitions is easy. XML is merely serialized Python objects. Since the XSD is not used, this, too, is easy.
Further (and most importantly) you do a one-time-only conversion of XSD to Python.
Look at this Stackoverflow question for a direction to take. http://stackoverflow.com/questions/1072853/convert-xsd-to-python-class
You might want to rethink your approach in a fundamental way if you want to create millions of rows of XML.
Define Python classes to contain your actual data. These must be absolutely correct, based on ordinary Python processing. No XSD-based lookup or validation or range checking or anything. Just Python. Your application data must be in Plain Old Python Objects (POPO).
Write a "serializer" that creates XML from your Plain Old Python Objects. Since the Python objects are already absolutely correct, the output XML will be absolutely correct.
Once you have this infrastructure of Python classes that produce XML in place, then you do the following.
- Rewrite your XSD parser so that it creates your Plain Old Python Object class definitions from the XSD. It's an XSD->Python translator.
Now you do the bulk of your work in Python. Millions of rows in simple Python class definitions is easy. XML is merely serialized Python objects. Since the XSD is not used, this, too, is easy.
Further (and most importantly) you do a one-time-only conversion of XSD to Python.
Look at this Stackoverflow question for a direction to take. http://stackoverflow.com/questions/1072853/convert-xsd-to-python-class