开发者

How to serialize XML document in python using xml.dom library

开发者 https://www.devze.com 2023-01-21 06:36 出处:网络
I\'d like to know how I can serialize an XML document in 开发者_开发知识库python specifically using the xml.dom library.You mean something like:

I'd like to know how I can serialize an XML document in 开发者_开发知识库python specifically using the xml.dom library.


You mean something like:

xml.dom.ext.PrettyPrint(doc, open(name, "w"))

where doc is the XML document and name is the name of the file?

Or, if you have xml.dom.minidom, how about the xml.dom.minidom.writexml function?

0

精彩评论

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