开发者

How to do parse xml file with XSD in python using minidom parser

I want to parse XML file in python and it should be validated against XSD as well. I have already used minidom for parsing XML file when I added XSD to header of XML seems like its not all valida开发者_开发知识库ting XML against XSD.

Can you please let me know how to achieve this using minidom??

Waiting for your reply


As the name suggests, miniDom is a library for interacting with the Document Object Model (DOM) API. As wikipedia states:

The Document Object Model (DOM) is a cross-platform and language-independent convention for representing and interacting with objects in HTML, XHTML and XML documents.

It doesn't focus on the "validity" of the document, just that it is well-formed and able to be parsed and browsed.

As such, miniDom won't have any XML validation capability as this is beyond the scope of the DOM API.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜