简体   繁体   English

读取失败<filename>详细信息格式不正确(无效令牌)

[英]Read failed for <filename> Details not well formed(invalid token)

I have been trying to parsing one xml file through npm package node-expat there certain xml file我一直在尝试通过 npm package node-expat 解析一个 xml 文件,那里有某些 xml 文件

<?xml version="1.0" encoding="utf-8"?><root><header><documentType>ItemFulfillment</documentType></header><record id="1"><Document_Number>IF0916382</Document_Number><Picked_Date>2022-05-06T16:45:04.543</Picked_Date><Reference_Number>IF0916382</Reference_Number><Item><Itemline><Item>GSW0145-GR02 : GSW0145-GR02-1/2</Item><OrderedQuantity>1.00000</OrderedQuantity><ShippedQuantity>1.00000</ShippedQuantity><UPC>019624238898</UPC></Itemline><Itemline><Item>GSW0144-GR02 : GSW0144-GR02-1/2</Item><OrderedQuantity>1.00000</OrderedQuantity><ShippedQuantity>1.00000</ShippedQuantity><UPC>019624272588</UPC></Itemline></Item><Packaging><PackageLine><Tracking_Number>1ZEW5167YW14791144</Tracking_Number><Weight>1.20000</Weight></PackageLine></Packaging><Shipping_Addressee>Katherine Hooks</Shipping_Addressee><Shipping_Address_1>815 Edwards Road</Shipping_Address_1><Shipping_Address_2>Unit 20</Shipping_Address_2><Shipping_City>Greenville</Shipping_City><Shipping_Country>US</Shipping_Country><Shipping_Zip>29615</Shipping_Zip><Shipping_State_Province>SC</Shipping_State_Province></record></root>

This files works in almost all cases but sometimes it fails.Getting following error Read failed for Details not well formed(invalid token)此文件在几乎所有情况下都有效,但有时会失败。出现以下错误 Read failed for Details not well-formed(invalid token)

You can check below npm package for parsing XML.你可以查看下面的 npm 包来解析 XML。

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

If you want to use you same npm package then please check the below image for your reference.如果您想使用相同的 npm 包,请查看下图以供参考。 在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 木偶(评估失败:语法错误:令牌无效或意外) - Puppeteer (Evaluation failed: syntaxerror: invalid or unexpcted token) 为什么前端说格式不正确 - Why frontend says that not well-formed 发送到CouchDB时,Json不是很好 - Not well formed Json when sending to CouchDB 无效令牌错误:指定无效令牌:无法读取未定义的属性“替换”? - Invalid Token Error: Invalid token specified: Cannot read property 'replace' of undefined? Keycloak - 授权验证失败。 原因:无效的令牌(错误的 ISS) - Keycloak - Grant validation failed. Reason: invalid token (wrong ISS) Slack users.list api 在传递有效令牌时也抛出 invalid_auth 错误 - Slack users.list api throwing invalid_auth error on passing of valid token as well 无法读取未定义的属性“代码”,解码 Firebase ID 令牌失败 - Cannot read property 'code' of undefined, Decoding Firebase ID token failed “EMALFORMED无法读取bower.json”“意外令牌/” - “EMALFORMED Failed to read bower.json” “unexpected token /” 不记名令牌无效令牌 - Bearer Token Invalid Token 如何配置节点 Redis 客户端在连接失败时立即抛出错误? [阅读详情] - How to configure Node Redis client to throw errors immediately, when connection has failed? [READ DETAILS]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM