我將從我的節點 js api 發送 XML 回應。目前我正在使用 xml - npm
uj5u.com熱心網友回復:
標記中的冒號表示名稱空間前綴,并且因為您缺少g:名稱空間,所以它不是有效的 XML,而不是節點 XML 問題。
you need to define namespace, looks like Google Merchant, so try adding it in the root's _attr like this:
{
toys: [
{
_attr: {
decade: '80s',
locale: 'US',
"xmlns:g": "http://base.google.com/ns/1.0"
//...
check: What does the XML syntax with a colon mean?
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/434756.html
