Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将XML数据JSON转换为QBO3.
XML
JSON
QBO3
是否有可用的本机方法?
尝试在控制台中运行以下命令:
var xml = "<head><node1>node1</node1><node2>node2</node2></head>"
var xml = "<head><node1>node1</node1><node2>node2</node2></head>
var xmlToJson = new XMLtoJSON;
xmlToJson.fromStr(xml);
请注意,除了fromStr[ing]方法之外,XMLtoJSON 对象还有一个fromFile可用的方法。
fromStr[ing]
fromFile