格式化从表单 POST 返回的 XML

发布于 2024-08-03 03:22:55 字数 261 浏览 3 评论 0原文

我有一个常规的 HTML 页面,上面有一个表单。该表单 POST 到远程服务器,该服务器以 XML 形式返回其数据。

然后我想将这些数据转换为易于阅读的格式。我该怎么做呢?我愿意尝试客户端或服务器端解决方案。我们使用 Oracle Portal 进行开发工作(恶心),但我不完全确定如何使用内置 Portal XML 组件或通过手动构建的存储过程来完成此工作。

这可能是一个非常基本的问题,但我很困惑,在网上找不到任何真正能帮助我的东西。

感谢您的帮助, 汤姆

I have a regular HTML page with a form on it. The form POSTs to a remote server that returns its data in XML.

I want to then transform this data into an easy-to-read format. How do I go about doing this? I am willing to try client-side or server-side solutions. We do our development work using Oracle Portal (yuck), and I am not entirely sure how I can do this using the built-in Portal XML-components, or through a hand-built stored procedure.

This is probably a pretty basic question, but I am fried and can't find anything online that would really help me.

Thanks for your help,
Tom

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

绳情 2024-08-10 03:22:55

您可以尝试 XSLT - xml 样式表,但只有当您只是尝试将 XML 更改为类似的 HTML 结构或将其削减时,它很快就会变得混乱。

You could try XSLT - xml style sheets, but only if your just trying to change the XML into a similar HTML structure or cut it down, It can get messy quite quickly.

零度° 2024-08-10 03:22:55

您可以使用一些 JavaScript 来动态更改 DOM 以添加更新的元素。或者,如果您有权访问服务器运行时,则可以自己捕获 POST 数据,然后调用实际后端,然后在服务器程序中使用 XSLT 转换数据,然后再将其发送回客户端。所有这些都假设您的服务器运行时具有这些功能。

You could use some JavaScript to dynamically alter the DOM to add newer elements. Or, If you have access to a server runtime, you could catch the POST data yourself, then make a call to the actual backend, then use XSLT in your server program to convert the data before sending it back to the client. All of this assuming that you have these features in your server runtime.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文