开发者

Transform XML to display results. What to use XSLT or a POJO?

开发者 https://www.devze.com 2023-04-06 15:44 出处:网络
The application I am working on receives开发者_Python百科 a very complex XML as a response form an external system. The XML needs to be parsed to display results to the user.

The application I am working on receives开发者_Python百科 a very complex XML as a response form an external system. The XML needs to be parsed to display results to the user.

I am trying to figure out the best approach to transform the XML to 'Display Ready' form. I have 2 options

  1. Use XPATH to populate POJOs from XML which could be sent to the view layer for display.
  2. Use XSLT transformation and display the results received in XML.

Which one would be faster? I understand that XSLT would get verbose and difficult to maintain.

Thanks in advance.

Shardul.


If it's for displaying only, I would prefer a XLST file. But when you have to proces files in some sort way POJO will to the job

0

精彩评论

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