如何转换(或序列化)JavaScript数据对象(或模型)到xml使用ExtJs [英] How to convert (or serialize) javascript data object (or model) to xml using ExtJs

查看:131
本文介绍了如何转换(或序列化)JavaScript数据对象(或模型)到xml使用ExtJs的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


  1. 如何将该实例转换为XML?

我正在使用ExtJs 4.2。我有一个ExtJs模型的实例。

I am working with ExtJs 4.2. I have an instance of an ExtJs model.


  1. 如何将它转换为XML?

我有一个匿名的JavaScript对象(有几个属性)。

I have an anonymous JavaScript object (with a couple of properties).

我不知道上述两个答案是否相同。 XML将作为身体发送到针对第三方Web服务的POST操作。

I am not sure if the answers for both of the above is same. The XML will be sent as body to a POST operation against a third party web service.

推荐答案

将JavaScript转换为JavaScript的JavaScript是亵渎!

Converting JSON to XML in JavaScript is blasphemy!

但是,如果我不得不这样做,我会使用:
http://code.google.com/p/x2js/

But if I had to do it I would use: http://code.google.com/p/x2js/

这篇关于如何转换(或序列化)JavaScript数据对象(或模型)到xml使用ExtJs的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆