使用JavaScript编写xml的库 [英] Libraries to write xml with JavaScript

查看:64
本文介绍了使用JavaScript编写xml的库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用JavaScript(node.js)进行一些服务器端编码,我想编写有效的xml。

I am doing some server side coding with JavaScript (node.js) and I would like to write valid xml.

我发现了两个库,但我确定有更多/更好!?

I found two libs, but I am sure there are more/better!?

  • http://goessner.net/download/prj/jsonxml/ (LGPL)
  • not yet released: https://sourceforge.net/projects/jsonix (LGPL)

要求:开源(用于商业用途)

Requirements: open source (for commercial usage)

如果项目快速,小巧且易于使用(按此顺序),那将会很酷。我希望有一个较低级别的访问权限

Would be cool if the project is fast, small and simple to use (in that order). And I would like to have a bit lower level access ala

doc.addElement('xy').addAttr('name', 'bob');


推荐答案

node.js有许多XML库列于 http://github.com/ry/node/wiki/modules#parsers -xml

There are a number of XML libraries for node.js listed at http://github.com/ry/node/wiki/modules#parsers-xml

如果内存服务,那么牵引力最大的是 http://github.com/polotek/libxmljs ,似乎是麻省理工学院的许可。

If memory serves, the one that has the most traction is http://github.com/polotek/libxmljs, which appears to be MIT licensed.

这篇关于使用JavaScript编写xml的库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆