开发者

How to render XML data from controller to view efficiently

开发者 https://www.devze.com 2023-03-10 00:41 出处:网络
I am working on a project that requires that I render XML data (that would be my model).Its basically going to be represented in a row - column format similar to your standard database representation.

I am working on a project that requires that I render XML data (that would be my model). Its basically going to be represented in a row - column format similar to your standard database representation. Except you should be able to click on a row and from there perform some basic data entry. I initially thought about using Json data and Jgrid to do this, but It seems like it may be more trouble than it is worth. From conversations with my co-workers, it seems as though it is possible to send xml from a controller straight to the view. Since XML is just a string, I guess that wouldn't be to hard. I am just a little unsure about how to get this done. So I guess I mentioned all that to ask, how can you render XML data in a view that you get from a c开发者_StackOverflow中文版ontroller. What is best practice in a situation like this? What is the best way to send XML over from a controller to a view? What is the best way to render this view? Is there a way that I can make a row of that xml data "clickable"? Should I just byte the bullet and try and figure out jqGrid?

Thanks, Derek


Your controller should return a model to your view.
It's easier to manage and you don't have to parse XML. It's all explained here and here

Watch these tutorials (Plurasight) if you have time.

0

精彩评论

暂无评论...
验证码 换一张
取 消