Hi, I am trying to find any tip on how to use minidom or etree xml implementations to check the xml syntax. I just found that the only way to check xml syntax throught dtds is using lxml. Would it be possible to implement this in the minidom or ElementTree default lib? I have seen bug http://bugs.python.org/issue2124 that speaks about the dtds fetch, but didn't see any place where it speaks about them being checked.
You should ask for usage tips on python-list or other forums. 2.6 and 3.1 only get security fixes. 2.7 and 3.2,3.3 only get bug fixes. This looks like a request for a new feature (assuming that it is not available now). I am not familiar with the modules, but I expect that the request is out of scope for minidom. "xml.dom.minidom is a light-weight implementation of the Document Object Model interface. It is intended to be simpler than the full DOM and also significantly smaller." Eli, is etree open to new features and might the request be a sensible addition, or should this issue be closed?
I am currently using a subprocess with a call to xmllint to make it create a temporal file that gets created on execution for xmllint use. I have seen about lxml, but I wondered if there is any place in the standard python to put xml validation
I agree. The stdlib is not intended to do everything. That is why we maintain an index and optional repository for third party packages. For xml processing, lxml, in particular, is a recommended extension/replacement for advanced users. It includes an etree interface, to make migration from etree as easy as possible. Javier, if you disagree, you could post to the python-ideas list. But I strongly suspect you would get about the same answer, that there is no point to duplicating existing external packages, and no desire to incorporate any more external packages, at least not for xml.