XML树发现(脚本,工具,

编程入门 行业动态 更新时间:2024-10-09 10:31:33
本文介绍了XML树发现(脚本,工具,__?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 最后以编程方式深入研究XML。有没有人有最好的 练习建议,以编程方式通过Python发现任意XML文档的结构 ? 似乎喜欢它是一个普通的轮子我会重新发明。 谢谢和欢呼 EP

Hi all, Finally diving into XML programmatically. Does anyone have a best practice recommendation for programmatically discovering the structure of an arbitrary XML document via Python? It seems like it is a common wheel I''d be re-inventing. Thanks and cheers EP

推荐答案

呃********** *@gmail 写道: er***********@gmail wrote: 最后以编程方式深入研究XML。有没有人有最好的实践建议,通过Python以编程方式发现任意XML文档的结构? 看起来这是一个普通的轮子我会被重新-inventing。 Finally diving into XML programmatically. Does anyone have a best practice recommendation for programmatically discovering the structure of an arbitrary XML document via Python? It seems like it is a common wheel I''d be re-inventing.

它是。查找XML DOM。 - Erik Max Francis&& ma*@alcyone && www.alcyone/max/ 美国加利福尼亚州圣何塞市&& 37 20 N 121 53 W&& AIM erikmaxfrancis 一盎司的伪善值得一磅野心。 - Michael Korda

It is. Look up XML DOM. -- Erik Max Francis && ma*@alcyone && www.alcyone/max/ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis An ounce of hypocrisy is worth a pound of ambition. -- Michael Korda

"以编程方式深入研究XML。有没有人有最好的 练习建议,通过Python以编程方式发现任意XML文档的结构? 您可以使用DOM或SAX,或任何更友好的XML 处理库来完成此操作。你可能想要更具体一点。 你想从这个发现中得到什么样的输出? - Uche Ogbuji Fourthought,Inc。 uche.ogbuji fourthought copia.ogbuji 4Suite 文章: uche.ogbuji/tech/publications/ "inally diving into XML programmatically. Does anyone have a best practice recommendation for programmatically discovering the structure of an arbitrary XML document via Python?" You can do this with DOM or SAX, or any of the many more friendly XML processing libraries out there. You might want to be more specific. What sort of output do you want from this discovery? -- Uche Ogbuji Fourthought, Inc. uche.ogbuji fourthought copia.ogbuji 4Suite Articles: uche.ogbuji/tech/publications/

我正在考虑的输出是一个DOMDNA ; - 这是DOM 没有元素或其数据的实例,一棵光秃秃的树,一个基于文档中的内容的原型树(而不是什么是 合法包括在文件中。 足够的数据,我知道任意元素: 1)元素是否在文件中 2)在哪里找到它(父母的链子) 如我所说,我刚刚开始想想这个主题,所以也许 最好的做法就是将完整的DOM加载到 内存中。我仍然在制造一个模式。一个模式。 EP The output I was contemplating was a DOM "DNA" - that is the DOM without the instances of the elements or their data, a bare tree, a prototype tree based on what is in the document (rather than what is legal to include in the document). Just enough data that for an arbitrary element I would know: 1) whether the element was in a document 2) where to find it (the chain of parents) As I mentioned, I''m just starting to think about the subject, so maybe the best practice is something else like loading the full DOM into memory. I''m still in the make one to throw away one mode. EP

更多推荐

XML树发现(脚本,工具,

本文发布于:2023-11-29 10:55:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1646190.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:脚本   发现   工具   XML

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!