Node.js实现W3C XML DOM的库? [英] Node.js library implementing W3C XML DOM?
问题描述
- node-o3-xml - segfaults on解析
- node-o3-fastxml - segfaults on parse
- libxmljs - 不使用标准W3C DOM API
- jsdom - 使用HTML DOM而不是XML DOM(例如
element.tagName
将返回大写形式,而不是区分大小写)
我可以使用不同的API编写第二个实现来执行相同的功能,但是我宁愿找到一个将暴露这些标准接口的库,以便我可以在两个上下文中使用相同的代码。有没有一个实现W3C DOM API的工作的node.js库?
XMLDOM 可能是一个不错的选择,它是一个基于W3C标准的DOMParser和XMLSerializer(DOM Level2 CORE)
祝你好运
I've written some code to manipulate an XML document using standard W3C DOM APIs. It works well in the browser environment, and I'd like to get it to work under node.js. Unfortunately, I have not been able to find a working node.js library implementing standard W3C DOM APIs. Here are the libraries I have tried:
- node-o3-xml - segfaults on parse
- node-o3-fastxml - segfaults on parse
- libxmljs - does not use standard W3C DOM APIs
- jsdom - uses HTML DOM, rather than XML DOM (e.g.
element.tagName
will return the uppercase form, rather than case-sensitive form)
I could write a second implementation, using a different API, to perform the same function, but I'd rather find a library that will expose these standard interfaces, so that I can use the same code in both contexts. Is there a working node.js library that implements the W3C DOM API?
XMLDOM might be a good choice, it's a W3C Standard based DOMParser and XMLSerializer (DOM Level2 CORE)
good luck
这篇关于Node.js实现W3C XML DOM的库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!