好用的XML解析库——fast-xml-parser

有时候需要在前台用到xml的解析,并且可能需要解析后再重新生成xml字符串,这个时候就可以用到fast-xml-parser了。

优点

使用简单,主要有两个对象,分别是XMLParser和XMLBuilder。

主要需要关注的属性有 ignoreAttributes 和 suppressEmptyNode 。

npm库地址

https://www.npmjs.com/package/fast-xml-parser

测试地址

https://naturalintelligence.github.io/fast-xml-parser/

github地址

https://github.com/NaturalIntelligence/fast-xml-parser

相关推荐
筝筝ba8 小时前
如何跳过FFDC
xml·linux·运维·服务器·网络
yuzhiboyouye1 天前
那xml对应的sql语法,列举一下
xml·数据库·sql
筝筝ba5 天前
OpenBMC 自动化测试中的多进程陷阱:从 Execute Process 返回异常到 output.xml 损坏问题分析
xml·linux·运维·服务器·网络
spencer_tseng10 天前
[j2cache ehcache.xml]/tmp/.ehcache-diskstore.lock (Permission denied)
xml·linux·python·ehcache·[j2cache
DevOpenClub11 天前
PDF 多格式解析如何避免混用输出:TEXT、HTML、XML 与 TAG 数据契约
xml·前端·数据库·pdf·html
Java小白笔记11 天前
MyBatis XML Mapper 标签与 CRUD 原理实战
xml·数据库·mybatis
风萧萧199912 天前
JAVA :JSONObject转换为XML
xml·java·python
马优晨14 天前
pom.xml 中 jquery webjars 依赖解释
xml·前端·jquery·jquery webjars·webjars依赖
楚识科技15 天前
定制 OCR 服务:非标证件与表格的 XML 字段映射实践
xml·ocr
光泽雨16 天前
JSON /XML转换
xml·json